Bug#909905: gradle FTBFS when building with openjdk-11 (needs update to 4.7.0 or upstream patch)

Emmanuel Bourg ebourg at apache.org
Mon Oct 1 14:29:55 BST 2018


Le 01/10/2018 à 11:48, Emmanuel Bourg a écrit :
 
> Thanks a lot for investigating this issue Tiago. I'll apply the patch.

The fix for the Java version parsing issue can be reduced to:

--- a/subprojects/base-services/src/main/java/org/gradle/api/JavaVersion.java
+++ b/subprojects/base-services/src/main/java/org/gradle/api/JavaVersion.java
@@ -26,7 +26,7 @@
 public enum JavaVersion {
     VERSION_1_1(false), VERSION_1_2(false), VERSION_1_3(false), VERSION_1_4(false),
     // starting from here versions are 1_ but their official name is "Java 6", "Java 7", ...
-    VERSION_1_5(true), VERSION_1_6(true), VERSION_1_7(true), VERSION_1_8(true), VERSION_1_9(true), VERSION_1_10(true);
+    VERSION_1_5(true), VERSION_1_6(true), VERSION_1_7(true), VERSION_1_8(true), VERSION_1_9(true), VERSION_1_10(true), VERSION_1_11(true);
     private static JavaVersion currentJavaVersion;
     private final boolean hasMajorVersion;
     private final String versionName;


But that's not enough, the build fails later due to the removal of
sun.misc.Unsafe.defineClass in Java 11. It seems this was fixed in
Gradle 4.8.



More information about the pkg-java-maintainers mailing list