JDK 19 support
JDK 19 is going to land in September and most likely project Loom be previewed there. I am eagerly awaiting it but I'm unsure as to what that means for ProGuard. Will ProGuard have to do any changes to support that?
Hi @boris-petrov ! As far as I can tell, the Loom changes shouldn't impact ProGuard, since there's no bytecode / class file changes involved.
You can already test the preview version with ProGuard by building ProGuard + ProGuardCORE with a bumped max version number (https://github.com/Guardsquare/proguard-core/blob/master/src/main/java/proguard/classfile/VersionConstants.java#L85)
You can checkout both repositories and do a composite build:
$ ./gradlew --include-build ../proguard-core assemble
Or install proguard-core to maven local and use that version in the ProGuard build.
@mrjameshamilton thanks for the information! That's great news! If you think there are/might be changes in JDK 19 that will require support in ProGuard, you can use this issue for that. If not, you can close it. :) Thanks!
I've tested proguard on JDK 19 with this patch applied to VersionConstants.java:
diff --git a/base/src/main/java/proguard/classfile/VersionConstants.java b/base/src/main/java/proguard/classfile/VersionConstants.java
index 7fad5ea..adb1a98 100644
--- a/base/src/main/java/proguard/classfile/VersionConstants.java
+++ b/base/src/main/java/proguard/classfile/VersionConstants.java
@@ -62,6 +62,8 @@ public class VersionConstants
public static final int CLASS_VERSION_17_MINOR = 0;
public static final int CLASS_VERSION_18_MAJOR = 62;
public static final int CLASS_VERSION_18_MINOR = 65535;
+ public static final int CLASS_VERSION_19_MAJOR = 63;
+ public static final int CLASS_VERSION_19_MINOR = 65535;
public static final int CLASS_VERSION_1_0 = (CLASS_VERSION_1_0_MAJOR << 16) | CLASS_VERSION_1_0_MINOR;
public static final int CLASS_VERSION_1_2 = (CLASS_VERSION_1_2_MAJOR << 16) | CLASS_VERSION_1_2_MINOR;
@@ -81,6 +83,7 @@ public class VersionConstants
public static final int CLASS_VERSION_16 = (CLASS_VERSION_16_MAJOR << 16) | CLASS_VERSION_16_MINOR;
public static final int CLASS_VERSION_17 = (CLASS_VERSION_17_MAJOR << 16) | CLASS_VERSION_17_MINOR;
public static final int CLASS_VERSION_18 = (CLASS_VERSION_18_MAJOR << 16) | CLASS_VERSION_18_MINOR;
+ public static final int CLASS_VERSION_19 = (CLASS_VERSION_19_MAJOR << 16) | CLASS_VERSION_19_MINOR;
- public static final int MAX_SUPPORTED_VERSION = CLASS_VERSION_18;
+ public static final int MAX_SUPPORTED_VERSION = CLASS_VERSION_19;
}
It would be great to have a (beta) release with this patch such that I can use it in our CI system.
Hi @dougxc ! I've made the update in ProGuardCORE, hoping to get a ProGuard version out soon.
Hi @mrjameshamilton I see that ProGuardCORE 9.0.3 is now on maven.
Do you have a rough ETA as to when there will be proguard-base and proguard-retrace jars on maven that use proguard-core 9.0.3?
I am currently modifying the classpath to use 7.2.0-beta1 of these jars with proguard-core 9.0.3. It seems to work but having jars designed to work together would be more reassuring.
Hi @dougxc ! Sorry for the delay! We've released 7.3.0-beta1 :)
Thanks! I assume it will show up on maven before too long?
Thanks! I assume it will show up on maven before too long?
Yes, should be there soon!