Running Gradle (7.4.2) with the following plugin.
id “org.sonarqube” version “3.3”
When running gradle sonarqube
I get the following error.
* What went wrong:
Execution failed for task ':app:sonarqube'.
> org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
Per the documentation:
The most common case is to run the analysis with Java 11, while the project itself uses Java 8 or before for its build. This case is normally automatically handled when using Maven or Gradle, as well as with any flavor of SonarLint.
The gradle plugin does not seem to be automatically handling the Java version.