kelloggm / checkerframework-gradle-plugin

Gradle plugin to use the Checker Framework for Java
Apache License 2.0
66 stars 15 forks source link

Gradle 9 incompatibility #256

Closed jperkins-its closed 1 year ago

jperkins-its commented 1 year ago

Building a Checker enabled project with Gradle 9.0 gives the warning "Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0." which goes away if the Checker plugin is removed from the build. Running with --warning-mode all provides:

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.2.1/userguide/upgrading_version_8.html#java_convention_deprecation
The org.gradle.api.plugins.Convention 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.2.1/userguide/upgrading_version_8.html#deprecated_access_to_conventions

I'm not seeing either symbol used in the source code, so guessing they get referenced under the hood somewhere?

kelloggm commented 1 year ago

@jperkins-its, #257 should fix the issue. I'll publish version 0.6.31 once that PR is merged.

kelloggm commented 1 year ago

@jperkins-its Can you try version 0.6.31 and let us know if it solves the issue you're seeing? Thanks :)

jperkins-its commented 1 year ago

Thanks for the quick turnaround! Unfortunately, building with id 'org.checkerframework' version '0.6.31' apply false still gives me the warnings (and removing the plugin makes them go away).

kelloggm commented 1 year ago

Unfortunately, building with id 'org.checkerframework' version '0.6.31' apply false still gives me the warnings (and removing the plugin makes them go away).

That is unfortunate, since the changes in 0.6.31 remove the warning on the small test project that I tried out.

Are you able to share a build scan (you can produce one by running ./gradlew help --scan)? If so, the "deprecations" tab of the scan is extremely useful for figuring out exactly which part of the plugin is responsible for the issue.

jperkins-its commented 1 year ago

Sure, thanks for looking into it!

https://scans.gradle.com/s/tcqljevj2apk4

kelloggm commented 1 year ago

Thanks, @jperkins-its. I've just merged another change that will hopefully fix the issue (#258, released as version 0.6.32). Can you give it a try and let me know if that fixes it for you? (I haven't been able to reproduce, so I'm working from your build scan directly.)

jperkins-its commented 1 year ago

That did the trick, thank you very much!

kelloggm commented 1 year ago

Glad to hear it!