Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

version 0.1.0 configuration as api but not work #158

Open
JaneWardSandy opened this issue Oct 9, 2023 · 0 comments
Open

version 0.1.0 configuration as api but not work #158

JaneWardSandy opened this issue Oct 9, 2023 · 0 comments

Comments

@JaneWardSandy
Copy link

JaneWardSandy commented Oct 9, 2023

Gradle: 8.2
IDEA: 2023.2.2

I have a Gradle with Kotlin project with two modules.

build.gradle.kts file of module A

plugins {
  id("org.openjfx.javafxplugin") version "0.1.0"
}

javafx {
  version = "21"
  configuration = "api"
  modules("javafx.base", "javafx.graphics", "javafx.controls", "javafx.media", "javafx.web")
}

build.gradle.kts file of module B

dependencies {
  api(project(":a"))
}

In the class code of module B, import javafx.application.Application but error Unresolved reference: javafx will be reported.
image

But if I downgrade the plug-in version to 0.0.14, everything will work properly.


Execute B:dependencies -q with 0.0.14

compileClasspath - Compile classpath for null/main.
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
|    |    \--- org.jetbrains:annotations:13.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 (*)
\--- project :A
     +--- org.openjfx:javafx-base:21
     +--- org.openjfx:javafx-graphics:21
     |    \--- org.openjfx:javafx-base:21
     +--- org.openjfx:javafx-controls:21
     |    \--- org.openjfx:javafx-graphics:21 (*)
     +--- org.openjfx:javafx-media:21
     |    \--- org.openjfx:javafx-graphics:21 (*)
     +--- org.openjfx:javafx-web:21
     |    +--- org.openjfx:javafx-controls:21 (*)
     |    \--- org.openjfx:javafx-media:21 (*)
     \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 (*)

And with 0.1.0

compileClasspath - Compile classpath for null/main.
+--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10
|    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10
|    |    +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10
|    |    \--- org.jetbrains:annotations:13.0
|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.9.10
|         \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.10 (*)
\--- project :A
     +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 (*)
     +--- org.openjfx:javafx-base:21
     +--- org.openjfx:javafx-graphics:21
     |    \--- org.openjfx:javafx-base:21
     +--- org.openjfx:javafx-controls:21
     |    \--- org.openjfx:javafx-graphics:21 (*)
     +--- org.openjfx:javafx-media:21
     |    \--- org.openjfx:javafx-graphics:21 (*)
     \--- org.openjfx:javafx-web:21
          +--- org.openjfx:javafx-controls:21 (*)
          \--- org.openjfx:javafx-media:21 (*)

Testing project:
jfx_demo.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant