Home > Blockchain >  Gradle 4 Java 11
Gradle 4 Java 11

Time:10-17

I have an Android project with Gradle 4 that I’m trying to analyze with Sonar. The sonar tasks must run with Java 11 so I configure the java version on 11 in my CI of Azure Devops but I receive this error:

Could not determine java version from '11.0.12'.

I saw that Gradle 4 is not compatible with Java 11 and that version 9 of sonar is not compatible with Java 8.

How to Perform Sonar Analysis on a Gradle 4 Project

CodePudding user response:

The minimum version of Gradle that supports Java 11 is 5.0.

You would need to upgrade to version 7.0 or above for Android.

Source: https://docs.gradle.org/current/userguide/compatibility.html

CodePudding user response:

as @Asif A Fasih mentioned, Gradle added official support for Java 11 with Gradle 5.0 - but they also provided a patch version for 4.10 which works with Java 11 - 4.10.3

------------------------------------------------------------
Gradle 4.10.3
------------------------------------------------------------

Build time:   2018-12-05 00:50:54 UTC
Revision:     e76905e3a1034e6f724566aeb985621347ff43bc

Kotlin DSL:   1.0-rc-6
Kotlin:       1.2.61
Groovy:       2.4.15
Ant:          Apache Ant(TM) version 1.9.11 compiled on March 23 2018
JVM:          11.0.6 (SAP SE 11.0.6 10-LTS-sapmachine)
OS:           Linux 5.4.0-88-generic amd64

i am sadly running this setup on multiple projects

  • Related