gluonfx-gradle-plugin icon indicating copy to clipboard operation
gluonfx-gradle-plugin copied to clipboard

nativeRunAgent task fails on modular project with Gradle 7.x

Open abhinayagarwal opened this issue 3 years ago • 11 comments

The plugin and Gradle both adds --module-path to the java command and the later over-writes the former causing the task to fail

abhinayagarwal avatar Sep 02 '21 13:09 abhinayagarwal

So this may be my issue as well then, the plugin fails for me with any version above 0.1.36, .37 being the one that added that task.

vgroenewold avatar Sep 23 '21 10:09 vgroenewold

So, not to be annoying, but is this plugin still under active development? Seems like the issue responses are not very active. The problem here is that I want to use JavaFX and GraalVM on a big project, as this is my first project with them it would be nice to know if that combination is a good one still. Is the Maven plugin working for anyone, if so I may then need to switch systems.

vgroenewold avatar Sep 28 '21 09:09 vgroenewold

The current version of both plugins (Maven/Gradle) is 1.0.6. You still seem to use the old plugin or mixed up the version numbers.

mipastgt avatar Sep 28 '21 10:09 mipastgt

@vgroenewold Both Maven and Gradle plugin are under active development. The most recent release version v1.0.6 is just 8 days old.

abhinayagarwal avatar Sep 28 '21 11:09 abhinayagarwal

I also tried the new versions and they give this exact problem as well unfortunately. All versions after the version that added the nativeRunAgent task are failing for me. Now trying maven to see if that does not show this specific issue.

vgroenewold avatar Sep 28 '21 12:09 vgroenewold

So just switched to Maven and there the runagent works, still have a javafx config issue somewhere but no problems with applying the plugin.

vgroenewold avatar Sep 28 '21 15:09 vgroenewold

I have the same issue, using gradle 7.2 and com.gluonhq.gluonfx-gradle-plugin' version '1.0.7' nativeRunAgent fails with module "xx.yy.zz" not found. nativeBuild runs without issue using the same build.gradle

matintokyo avatar Oct 08 '21 16:10 matintokyo

If i create a clean project and only adding id 'com.gluonhq.gluonfx-gradle-plugin' version '1.0.7' then i got following error message:

Caused by: org.gradle.api.tasks.TaskInstantiationException: Could not create task of type 'NativeRunAgentTask'.
...
Caused by: org.gradle.api.GradleException: javafxplugin:configJavafxRun task not found.

i added the javafxplugin manually id 'org.openjfx.javafxplugin' version '0.0.10'

after that my sync task was successful. I am not a gradle plugin developer, but i've found 'org.openjfx:javafx-plugin:0.0.10' in this repository. So my used version is the same version as here

TjayGs avatar Oct 23 '21 10:10 TjayGs

So it's an installation issue then? Can that not be addressed?

vgroenewold avatar Dec 10 '21 13:12 vgroenewold

I have the same issue, when running nativeRunAgent, I get:

Configure project :
Project : => 'fr.clementgre.pdf4teachers' Java module

Task :nativeRunAgent FAILED
Error occurred during initialization of boot layer
java.lang.module.FindException: Module javafx.swing not found, required by fr.clementgre.pdf4teachers

While nativeBuild do work.

ClementGre avatar Feb 06 '22 08:02 ClementGre

Same problem. nativeBuild works, but nativeRunAgent doesn't.

So, I have: javafx { version = "18" modules("javafx.controls", "javafx.fxml", "javafx.web") } in my build.gradle, but it looks like nativeRunAgent ignores it.

Haven't found any solution or workaround yet. Plugin version is: com.gluonhq:gluonfx-gradle-plugin:1.0.14 Gradle version is: 7.4.2

maxt avatar Jul 06 '22 12:07 maxt