Gradle and Modules not working?
My newly created Gradle+Modules project is failing to build with
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':HelloApplication.main()'.
> Process 'command 'C:/Program Files/Java/jdk-13.0.2/bin/java.exe'' finished with non-zero exit value 1
and
> Task :HelloApplication.main() FAILED
Error occurred during initialization of boot layer
java.lang.module.FindException: Module validatorfx not found, required by com.group
Reproduce:
1. Create a new JavaFX project through the Wizard
2. Use Gradle instead of Maven
3. When it asks you for adding extra libraries, select validatorfx (it has not module-info.java)
4. Trying to run the newly created project ends with an error
It does work with Maven! Only the Gradle one fails for non-moduled libraries. What do I need to setup so that gradle sees validatorfx?
Please sign in to leave a comment.
All the tasks will use the classpath, not the modulepath, when executing. This obviously will cause issues when trying to create a modular.
skylight paycards
It is known issue: https://youtrack.jetbrains.com/issue/IDEA-273703
Please try if it helps to specify this dependency as
I suppose that, you're trying to use already unsupported library. You have to use URL connection or downgrade to sdk 22. If you need SDK version 23, then contract here
I noticed the file module-info.java:
Which looks wrong to me, it should be:
However the IDE doens't like this and it shows as RED!!! autocomplete didn't like it too.
So I removed it, did a full rebuild and I also updated the version number of validatorfx to the latest build ( for me it was from 0.2.1 -> 0.3.1)
eg I changed the build.gradle file
implementation('net.synedra:validatorfx:0.2.1') { exclude(group: 'org.openjfx') }After that, I put it back in module-info.java and the auto complete fixed it to:
All good :)