-
Notifications
You must be signed in to change notification settings - Fork 62
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
Do not automatically apply the gradle-modules-plugin if the project uses a Gradle version >= 6.4. #96
Conversation
…e project uses a Gradle version >= 6.4.
While the gradle-modules-plugin is compatible with Gradle 7, I don't believe the JavaFX plugin needs to depend on the java-modules-plugin, as Gradle now has full module support (see here and here). I believe it would be better to allow users to decide themselves if they want to use the java-modules-plugin, as long as the JavaFX plugin doesn't depend on features that would be missing without it. Since Gradle considers module support stable since version 7 (it doesn't have to be explicitly enabled anymore), it might be better to change the version check in this PR to 7.0. What do you think? |
Thanks for your input. I agree that we can avoid depending on For example, if I try to run Modular HelloFX sample with Gradle 7.0,
We need to avoid this and let the plugin handle it automatically, such that the same application can run smoothly without user intervention across all Gradle version. Do you think this PR can be updated to take care of it? |
So you'd like the JavaFX plugin to inject a There is one issue I have with the automatic Even if this plugin injected the variable itself, there may be projects that depend on the gradle-modularity-plugin in ways we haven't taken into account. I would suggest one of the following solutions:
In the case of 2, I would recommend deprecating the dependency on the gradle-modularity-plugin, and issuing a warning message if the |
@abhinayagarwal I have implemented the second solution: The module plugin can be disabled by setting the One change worth noting: The options are now loaded before the modules plugin is applied. The tests don't fail, so it shouldn't have any implications. |
… native module support.
@mrcjkb Thank you for the update. I tried the latest changes on the modular HelloFX sample. Below are my observations:
The same can also be observed with a non-modular HelloFX sample. In both modular and non-modular application, JavaFX dependencies should always be on the module-path. |
Closing, as this will likely not work without using the Gradle 7.x API. |
See #94.