Gradle 9.0 deprecation

Hello all :wave:

In our project, we are trying to proactively address deprecations for Gradle 9.0.

One of them comes when using sonarqube Gradle plugin:

plugins {
    id("org.sonarqube")
}

Whenever we run the ./gradlew :sonar --warning-mode=all --stacktrace task we get the following warning:

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.5/userguide/upgrading_version_8.html#java_convention_deprecation
        at org.gradle.api.plugins.internal.NaggingJavaPluginConvention.logDeprecation(NaggingJavaPluginConvention.java:186)
        at org.gradle.api.plugins.internal.NaggingJavaPluginConvention.getSourceSets(NaggingJavaPluginConvention.java:154)
        at org.sonarqube.gradle.SonarPropertyComputer.configureJavaClasspath(SonarPropertyComputer.java:350)
        at org.sonarqube.gradle.SonarPropertyComputer.configureSourceDirsAndJavaClasspath(SonarPropertyComputer.java:339)
        at org.sonarqube.gradle.SonarPropertyComputer.lambda$configureForJava$4(SonarPropertyComputer.java:232)
        at org.gradle.api.internal.collections.CollectionFilter$1.execute(CollectionFilter.java:62)

My questions are:

  • Could you confirm that this should be addressed in the sonarqube plugin?
  • Could you address this issue?

Thank you in advance!

Hello @almeydajuan89, welcome to the Sonar Community!

Thank you for preemptively raising up this compatibility issue in sight of upgrading to Gradle 9. The [SONARGRADL-135] - Jira has been created to tackle it.

Cheers,
Angelo

1 Like