Java 11 code scanning with sonarcloud

my java project on java 11 (corretto-11) , we are using id ‘org.sonarqube’ version ‘3.3’ plugin

and below configuration for sonar cloud in gradle file

sonarqube {
    properties {
        property 'sonar.projectKey', 'xxxxx'
        property 'sonar.organization', 'xxxx'
        property 'sonar.host.url', 'https://sonarcloud.io'
        property 'sonar.login', 'secret'
    }
}

i’m getting below error

> Task :sonarqube FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':sonarqube'.
> org/sonar/batch/bootstrapper/EnvironmentInformation has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 55.0

java version

openjdk version "11.0.22" 2024-01-16 LTS
OpenJDK Runtime Environment Corretto-11.0.22.7.1 (build 11.0.22+7-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.22.7.1 (build 11.0.22+7-LTS, mixed mode)

gradle version

------------------------------------------------------------
Gradle 7.6.1
------------------------------------------------------------
Build time:   2023-02-24 13:54:42 UTC
Revision:     3905fe8ac072bbd925c70ddbddddf4463341f4b4
Kotlin:       1.7.10
Groovy:       3.0.13
Ant:          Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM:          11.0.22 (Amazon.com Inc. 11.0.22+7-LTS)
OS:           Linux 6.1.72-96.166.amzn2023.x86_64 amd64

Hi,

This guide should help:

 
Ann