Nouran
08/15/2025, 12:15 PMNouran
08/15/2025, 12:17 PMNouran
08/15/2025, 12:21 PMRafael Chaves
08/15/2025, 1:28 PMmarking a task in gradle 9 with notCompatible will discard the cacheNot only in Gradle 9. That has been true in previous releases as well. Not sure if at some point that was not the case.
Rafael Chaves
08/15/2025, 1:30 PMI remember that in gradle 9 tasks that break cc , gradle make it notCompatible internally so it doesn't break the full buildI am not sure what you are referring to, Nouran. Gradle never marks plugin tasks as incompatible. Maybe you are referring to graceful degradation, which was indeed introduced in Gradle 9, but it covers only Gradle own tasks, not 3rd-party plugin tasks.
Rafael Chaves
08/15/2025, 1:34 PM-Dorg.gradle.configuration-cache.problems=warn . That has indeed changed in 9.0, and that is what Gradle 9.0 release notes refer to.Rafael Chaves
08/15/2025, 1:35 PMStarting with Gradle 9.0.0, the presence of incompatible tasks in the work graph results in the cache entry being discarded regardless of the warning mode to ensure correctness.
Rafael Chaves
08/15/2025, 1:35 PMNouran
08/15/2025, 1:36 PMRafael Chaves
08/15/2025, 1:45 PMapparently none of the known pattern existWhat do you mean, Nouran? Patterns for/of what?
Nouran
08/15/2025, 1:45 PMRafael Chaves
08/15/2025, 1:46 PMRafael Chaves
08/15/2025, 1:47 PMRafael Chaves
08/15/2025, 1:47 PMRafael Chaves
08/15/2025, 1:58 PMapparently none of the known pattern existThere are other ways code can be incompatible with CC, i.e. it is not only about accessing the task project (though that is the most common). Serialization issues is another common class of problems, and may include references to
Project, but not necessarily.Rafael Chaves
08/15/2025, 1:59 PMRafael Chaves
08/15/2025, 2:00 PMNouran
08/15/2025, 2:07 PMNouran
08/15/2025, 2:07 PMNouran
08/15/2025, 2:08 PMNouran
08/15/2025, 2:13 PM./gradlew build -configuration-cacheNouran
08/15/2025, 2:14 PMnouranatef@Nouran sonar-testt % ./gradlew build -configuration-cache
Configuration cache is an incubating feature.
Calculating task graph as configuration cache cannot be reused because file 'settings.gradle' has changed.
BUILD SUCCESSFUL in 279ms
2 actionable tasks: 2 up-to-date
Configuration cache entry stored.Nouran
08/15/2025, 2:16 PM.withArguments('sonarqube','--configuration-cache', '--info', '-Dsonar.scanner.internal.dumpToFile=' + outFile.toAbsolutePath()) the cc on in this line and this is the error that I gotNouran
08/15/2025, 2:16 PMGradle runtime: support for using a Java agent with TestKit builds is not yet implemented with the configuration cache.Rafael Chaves
08/15/2025, 3:01 PMRafael Chaves
08/15/2025, 3:02 PM./gradlew sonar --configuration-cacheNouran
08/15/2025, 3:11 PM./gradlew sonar --configuration-cache
Starting a Gradle Daemon, 7 stopped Daemons could not be reused, use --status for details
Configuration cache is an incubating feature.
Calculating task graph as no configuration cache is available for tasks: sonar
> Task :sonar FAILED
Failed to query JRE metadata: GET https://api.sonarcloud.io/analysis/jres?os=macos&arch=arm64 failed with HTTP 401. Please check the property sonar.token or the environment variable SONAR_TOKEN.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':sonar'.
> The scanner boostrapping has failed! See the logs for more details.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
1 actionable task: 1 executed
Configuration cache entry discarded.Rafael Chaves
08/15/2025, 3:31 PMRafael Chaves
08/15/2025, 3:34 PMNouran
08/15/2025, 3:35 PMNouran
08/15/2025, 5:34 PMNouran
08/15/2025, 5:34 PMnouranatef@Nouran sonar-testt % ./gradlew sonar --configuration-cache
Configuration cache is an incubating feature.
Reusing configuration cache.
BUILD SUCCESSFUL in 13s
1 actionable task: 1 executed
Configuration cache entry reused.Nouran
08/15/2025, 5:36 PMRafael Chaves
08/15/2025, 6:32 PMRafael Chaves
08/15/2025, 6:32 PMRafael Chaves
08/15/2025, 6:34 PMRafael Chaves
08/15/2025, 6:35 PMNouran
08/15/2025, 8:00 PMRafael Chaves
08/15/2025, 8:03 PMNouran
08/15/2025, 8:10 PMRafael Chaves
08/15/2025, 8:22 PM