Passing Java 11 to SonarQube using Gradle with Java 8

The approach described in the documentation doesn’t work since running the sonarqube task also executes the JavaCompile tasks.

I came across the same problem in our build pipelines. It appears to be a bug - SonarScanner for Gradle adds dependencies on JavaCompile tasks

1 Like