Proguard preventing build using JDK 17 (Cannot support JDK 8 and 17)
See original GitHub issueProblem
Using JDK java 17.0.1 2021-10-19 LTS
and Gradle 7.3
When I run ./gradlew build
I get the following…
> Task :proguardJar FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':proguardJar'.
> java.io.IOException: Can't read [/home/theman/Applications/Java/jdk-17.0.1/jmods] (Can't read [jdk.jstatd.jmod] (Can't process class [module-info.class] (Unsupported version number [61.0] (maximum 60.65535, Java 16))))
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
It seems proguard should support this at least in Beta (https://github.com/Guardsquare/proguard/issues/132) so it should probably be upgraded to support 17 builds.
Current workaround
I am guessing I can use the 16 JDK but I don’t have time to try that rt now. I will setup a diff JDK shortly to confirm.
Sorry if I did this wrong new to contributing here.
Per @modmuss50 we cannot just upgrade proguard
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
java 8 - Maven, Proguard and JDK8 - Stack Overflow
It is well known issue and I've tried to fix it by installing latest tool and specifying specific proguard.jar path. But looks like...
Read more >ProGuard Manual: Version History - Guardsquare
To allow ProGuard to continue to optimize, obfuscate and shrink Java class files ProGuard now supports all Java versions including Java 17. Add...
Read more >Migrating From JDK 8 to Later JDK Releases
When your application is running successfully on the latest version of JDK, review Next Steps, which will help you avoid problems with future...
Read more >Java Obfuscator - Zelix KlassMaster - Change History
Corrects a bug in the GUI Build Helper tool which prevented progression beyond the "Class Open ... Support for Java 17 and its...
Read more >Xamarin.Android 11.0 release notes - Microsoft Learn
Android 11.0.2.0 in Visual Studio 2019 version 16.7.2 and Visual Studio ... Attempting to use Android SDK Build-Tools 30.0 with Java JDK 8...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yes, for now you need to use JDK 16.
The version of PG that supports 17 does not support Java 8 anymore hence why its using the version it is.
I should be able to set it up to use the older build on JDK 8 and the newer build on 17 to keep support for building loader with JDK 8 -> 17
I have opened a PR here: https://github.com/FabricMC/fabric-loader/pull/555 that should hopefully fix it.