My error:
> Task :compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> error: release version 11 not supported
My build.gradle
set systemProperties=11
Gradle 7.3.1
$ ./gradlew --version
------------------------------------------------------------
Gradle 7.3.1
------------------------------------------------------------
Build time: 2021-12-01 15:42:20 UTC
Revision: 2c62cec93e0b15a7d2cd68746f3348796d6d42bd
Kotlin: 1.5.31
Groovy: 3.0.9
Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021
JVM: 11.0.12 (Red Hat, Inc. 11.0.12+7-LTS)
OS: Linux 4.14.256-197.484.amzn2.x86_64 amd64
And java 11
openjdk 11.0.12 2021-07-20 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.12+7-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.12+7-LTS, mixed mode, sharing)