-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Java 22 #387
Comments
It looks like none of the features or changes in Java 22 require any special handling by ProGuard beyond the version number (e.g. no new attributes, bytecode instructions). Could you make a PR with the required changes, similar to the changes made for Java 21? Guardsquare/proguard-core#92 |
I do not understand. You say it is very easy and you ask me to make a Pull Request? I am not familiar with the code and GitHub policies, so for me it is a lot of work finding out what you mean and how to do that. I can wait, but I would hope there is an update when JDK 22 releases on March 19. I am not requesting special favors only that Proguard is compatible with the current JDK and maybe even with the EA when there is a release candidate. |
I would also like to use Java 22 with proguard, so I created a PR similar to the one for Java 21 mentioned above: Guardsquare/proguard-core#127 Thanks! |
The changes made by @henm have been merged already. Can we also expect a release in the near future :-? That would be great. |
The support to Java 22 urges!
Please as soon as possible! We need 🚀 Thank you 🙌 |
Came here as well to look for a release date on the Java 22 support in maven! I am currently migrating the application from Java 8 to 22 and found out it uses proguard and now I am stuck on the final step before being able to release :( |
@lordarnoud to bypass this issue and not delay the releases, what I made was compile with Java 21 and then flawless run with Java 22. It is not how we like to work, but until the new Proguard comes out, the only way to run with Java 22 is by compiling to Java 21. Of course, it is very bad for us programmers because we are unable to use in the source code any new feature of Java 22 yet... 😭 But at least in production, we can benefit from Java 22! 🚀 |
I just stumbled across the same problem. I made a tool that can change classfile version in one go in directories/zip archives/single files. val changeVersion = tasks.register<JavaExec>("changeVersion") {
javaLauncher.set(javaToolchains.launcherFor {
languageVersion.set(JavaLanguageVersion.of(17))
})
classpath(project.file("versionchanger.jar"))
mainClass.set("dev.xdark.versionchanger.CLI")
args(
listOf("22", "21") + listOf(project1, project2, project3)
.map { it.tasks.shadowJar.get().archiveFile.get().asFile.absolutePath }
)
} Hope someone finds this useful. |
@xxDark What makes you think that an incompatible class file gets compatible by just changing a number in it? This may just lead to difficult to trace crashes. |
Nothing makes me think that. That is why I put the text in bold. |
Is there a release date in sight for this? :) Or any updates on it? |
ProGuard 7.5 has just been published with Java 22 support |
Awesome! Thank you! |
Thanks a lot! |
As the first release candidate of Java 22 has arrived (https://openjdk.org/projects/jdk/22/) it would be nice if support would be added in the next patch/release. I hope it is just changing the allowed class file version to 66. Maybe directly do it for Java 23 so 67 (https://javaalmanac.io/bytecode/versions/) as early access build for Java 23 are also available (https://jdk.java.net/23/).
I would like to try out the new JEP 454: Foreign Function & Memory API and use it in my build process.
The text was updated successfully, but these errors were encountered: