3

I know, I know, there are lots of questions with a similar problem but I believe this problem is inherent to the gradle-tooling-api package.

./gradlew --version gives 5.2.1, and the JVM stated there is specifically "11.0.5".

My build.gradle includes the following dependency:

implementation  'org.gradle:gradle-tooling-api:4.3'

... which is the latest version available at Maven Central. Have tried relevant searching ... nothing comes up.

FWIW here is the output

java.lang.IllegalArgumentException: Could not determine java version from '11.0.5'.
    at org.gradle.api.JavaVersion.toVersion(JavaVersion.java:72)
    at org.gradle.api.JavaVersion.current(JavaVersion.java:82)
    at org.gradle.internal.jvm.UnsupportedJavaRuntimeException.javaDeprecationWarning(UnsupportedJavaRuntimeException.java:36)
    at org.gradle.tooling.internal.consumer.ConnectorServices.checkJavaVersion(ConnectorServices.java:59)
    at org.gradle.tooling.internal.consumer.ConnectorServices.createConnector(ConnectorServices.java:37)
    at org.gradle.tooling.GradleConnector.newConnector(GradleConnector.java:85)
    at core.MiscSpec.the help message should say where the log file is located(misc_tests.groovy:116)
mike rodent
  • 14,126
  • 11
  • 103
  • 157
  • Do you have your `JAVA_HOME` environment variable set correctly? – dan1st Dec 28 '19 at 21:02
  • Thanks. JAVA_HOME is /home/mike/.sdkman/candidates/java/current. "current" is a symlink to directory /usr/lib/jvm/java-11-openjdk-amd64. Do you have inside knowledge about GradleConnector making use of this env var? – mike rodent Dec 28 '19 at 21:12
  • Can you show the complete error/output? – dan1st Dec 28 '19 at 21:13

0 Answers0