-
Notifications
You must be signed in to change notification settings - Fork 37
Upgrade to version 2.0.0, enhance compatibility with Gradle 9.x #301
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
Conversation
…9.0+, and update Java source compatibility to 17. Refactor test dependencies and improve task handling in the module plugin.
|
Nice! When bumping the Gradle and Java version, the shadow plugin should also be updated. It's easy to miss because the identifier has changed. See the note on the plugin page . The plugin with the old identifier will see no updates anymore. build.gradle.kts: should become |
big-andy-coates
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Myself and others will really appreciate you finding the time to raise this PR - thanks @rcw3bb
Looks like a pretty comprehensive and careful upgrade.
I think raising the bar to JDK17 isn't ideal, but acceptable, assuming there is no workable alternative. Those on older Java versions can stay on the older version of the plugin. What drove the need to update the minimum Java version?
I'm also assuming there's a good reason why the minimum Gradle version is 8.11. This was released less than a year ago. It would be nice if we could support 8.0 and beyond. However, if that's not easily possible, then I don't consider it a blocker. What's stopping supporting versions down to 8.0?
I've commented on a few minor points in the PR. If you can find the time to address them it would be appreciated.
src/main/java/org/javamodularity/moduleplugin/internal/CompileModuleInfoHelper.java
Outdated
Show resolved
Hide resolved
src/test/java/org/javamodularity/moduleplugin/ModulePluginSmokeTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/javamodularity/moduleplugin/ModulePluginSmokeTest.java
Outdated
Show resolved
Hide resolved
src/test/java/org/javamodularity/moduleplugin/ModulePluginSmokeTest.java
Outdated
Show resolved
Hide resolved
…eTest.java Co-authored-by: Andy Coates <[email protected]>
…eTest.java Co-authored-by: Andy Coates <[email protected]>
Co-authored-by: Andy Coates <[email protected]>
…to Java 11. Change to buildScan to develocity since the enterprise is already deprecated.
|
Hi @big-andy-coates,
The artifact generated will stay on Java 11. But during development of this plugin, Java 17 is required since it's the minimum to run in Gradle 9.0 and also the minimum version needed by shadow plugin
In Gradle 9.0, the From: https://docs.gradle.org/current/javadoc/org/gradle/api/artifacts/ProjectDependency.html#getPath()
|
|
Hi @rcw3bb
I can see that your most recent commit changed the However, looks like the build is failing... |
|
Hi @big-andy-coates , I've updated the workflow, can you try the build when you have time? |
|
Running... |
|
Hi @big-andy-coates , is there still work to do in this PR or it can be possibly merged? |
|
On holiday... urgent? |
|
No, have a good holiday. I can wait. |
big-andy-coates
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @rcw3bb !
This pull request introduces significant updates to support Gradle 9.x and modern Java versions, while removing compatibility with older Gradle and Java versions. It updates the documentation, build configuration, test dependencies, and core plugin logic to align with these changes. The most important changes are grouped below:
Support for Newer Gradle and Java Versions:
README.md. [1] [2] [3] [4] [5] [6] [7]Dependency and API Updates:
junit-platform-launcherfor improved test support. [1] [2]getMainClass()instead of deprecatedgetMain(),getDestinationDirectory()instead ofgetOutputDir(), and replacedApplicationPluginConventionwithJavaApplication). [1] [2] [3] [4] [5] [6]Internal Logic and Compatibility Handling:
These changes modernize the plugin, streamline its usage with current tools, and ensure a smoother experience for users on the latest Gradle and Java platforms.