-
Notifications
You must be signed in to change notification settings - Fork 41
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
Stop using JavaPluginConvention for Gradle 7.1+ #299
Conversation
//Using the older javaConvention because we need to support older versions of gradle. | ||
@SuppressWarnings("deprecation") | ||
JavaPluginConvention javaConvention = project.getConvention().getPlugin(JavaPluginConvention.class); | ||
sourceSets = javaConvention.getSourceSets(); |
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.
This will work for now, but if 9.0 actually removes the conventions or JavaPluginConvention
, then this code will no longer compile when the Gradle wrapper is upgraded to 9.0 in this repo and will require being refactored again.
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.
this code will no longer compile when the Gradle wrapper is upgraded to 9.0 in this repo and will require being refactored again.
Yes, but I think released versions will still works fine with 9.0+, and no warning for 7.1+.
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#java_convention_deprecation
Thanks a lot for this @quaff ! Any concerns before we merge this in @shanman190 ? |
For now this is probably fine for now at least. The one concern that comes to mind is on JVMs that preemptively load all classes and the |
The org.gradle.api.plugins.JavaPluginConvention type has been deprecated. This is scheduled to be removed in Gradle 9.0. Consult the upgrading guide for further information: https://docs.gradle.org/8.7/userguide/upgrading_version_8.html#java_convention_deprecation
Fixes #307