Gradle Sonar Configuration Issue

Task :sonar FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:sonar’.

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

Current confg:
Java 11
Gradle 7.6
Sonarqube 9.6
Sonarscanner 4.7

How to resolve this issue ?

Hi,

Welcome to the community!

This error message is Java’s painfully obscure way of telling you that there’s a mismatch between the version of Java your executable was compiled with and the version you’re trying to run it with. I use this SO question as my cheat sheet for decrypting the version numbers.

Basically, you’re trying to use Java 8 to run something that was compiled with Java 11, and it just won’t work. You need to upgrade your Java install.

 
HTH,
Ann