Sonarqube Gradle task with Gradle 8 produces a crash on Report.getOutputLocation

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)

Running plugin version:

Gradle version:

Gradle 8.0-rc-1

Build time:   2022-12-29 12:32:50 UTC
Revision:     ae81f85f0e184196c188b96016eb3d9e38f60673

Kotlin:       1.8.0-RC2
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          17.0.5 (Azul Systems, Inc. 17.0.5+8-LTS)
OS:           Mac OS X 13.1 aarch64
  • what are you trying to achieve

Reporting coverage results to sonarcloud via the Gradle plugin.

  • what have you tried so far to achieve this

Running the Gradle task sonarqube.

The problem is here:

Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!

* What went wrong:
'org.gradle.api.provider.Provider org.gradle.api.reporting.Report.getOutputLocation()'

* Try:
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Exception is:
java.lang.NoSuchMethodError: 'org.gradle.api.provider.Provider org.gradle.api.reporting.Report.getOutputLocation()'
        at org.sonarqube.gradle.SonarPropertyComputer.getDestination(
        at org.sonarqube.gradle.SonarPropertyComputer.configureTestReports(
        at org.sonarqube.gradle.SonarPropertyComputer.extractTestProperties(
        at org.sonarqube.gradle.SonarPropertyComputer.lambda$configureForJava$5(
        at org.gradle.api.internal.collections.CollectionFilter$1.execute(
        at org.gradle.api.internal.DefaultDomainObjectCollection.all(
        at org.gradle.api.internal.DefaultDomainObjectCollection.withType(
        at org.sonarqube.gradle.SonarPropertyComputer.configureForJava(
        at org.sonarqube.gradle.SonarPropertyComputer.addGradleDefaults(
        at org.sonarqube.gradle.SonarPropertyComputer.computeSonarProperties(
        at org.sonarqube.gradle.SonarPropertyComputer.computeSonarProperties(
        at org.sonarqube.gradle.SonarPropertyComputer.computeSonarProperties(
        at org.sonarqube.gradle.SonarPropertyComputer.computeSonarProperties(
        at org.sonarqube.gradle.SonarQubePlugin.lambda$configureTask$2(
        at org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(
        at org.gradle.api.internal.provider.TransformBackedProvider.calculateOwnValue(
        at org.gradle.api.internal.provider.AbstractMinimalProvider.calculateValue(
        at org.gradle.api.internal.provider.MapCollectors$EntriesFromMapProvider.collectEntries(
        at org.gradle.api.internal.provider.DefaultMapProperty$CollectingSupplier.calculateValue(

Hello @mmoayyed thanks for reporting this.
Is there a specific reason why it is being run without using the gradle wrapper?

I believe this is run with the Gradle wrapper. The wrapper is just updated to use Gradle 8. Is there something you see in the error trace that indicates wrapper is not used?

I have not tried Gradle 8 RC2, but I am not sure that would solve this.

We don’t support Gradle 8 yet, that is the reason why I think this was not executed with via the wrapper using the ./gradlew command.

Can you please share how you are running the command?