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
ProGuard cannot find all classes in release 3.4.0 #1298
Comments
That’s curious. We don’t reference those APIs in AsyncTimeout.kt. I should download 3.4.0 to see if our release build references ’em. |
javap -v okio/AsyncTimeout\$Watchdog.class
|
I asked on the Kotlin slack. |
It would probably help to build OKIO with a real JDK 17 or so. |
Regarding the ProGuard side of this: ProGuard (and R8) typically require all the referenced classes to fully process & optimize applications. If classes are missing, ProGuard will warn about it because it might not be able to perform optimizations correctly. Classes come from your own code and third-party libraries embedded in your app (program classes, Typically you should provide all the missing classes but it can happen that a missing referenced class is OK: especially if it's a third-party library that references some class missing class but your app works fine normally, then it's probably OK for ProGuard to continue without the class. You can ignore all warnings with
|
I recently switched my Kotlin multiplatform project from okio 3.3.0 to 3.4.0. The code still works as before in the IDE and debug builds but when I then try to create a release build I get the following errors from ProGuard:
This is strange, because these classes do only exist as previews in Java Versions since 19 as far as I have seen and will only be made available in 21. So how can okio be depending on them and what could I do to circumvent this issue (besides not upgrading to 3.4.0)?
I am building with openjdk version "17.0.7" 2023-04-18 on macOS Ventura 13.4.1 and Kotlin 1.8.22
The text was updated successfully, but these errors were encountered: