Skip to content
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

R8 minification classfile version #64

Closed
TWiStErRob opened this issue Sep 29, 2024 · 3 comments
Closed

R8 minification classfile version #64

TWiStErRob opened this issue Sep 29, 2024 · 3 comments

Comments

@TWiStErRob
Copy link
Contributor

Hey, you have this line in your R8 task:

// R8 uses the executing JDK to determine the classfile target.

Do you remember what that means or where that knowledge came from?

I'm asking because I tried setting a higher toolchain and the .class files inside the minified jar are still compatible with whatever the source .jar files were. Each class preserves the same .class file version as the input is.

Related (for my reference): ajalt/mordant#233

@JakeWharton
Copy link
Owner

Probably was a bug. It was for classes that it synthesized like horizontal lambda merges.

Screenshot_20240929-094315.png

I don't think the Mordant thing is related. FFM is only available starting in JDK 22 so you have to use JDK 22 or newer for the runtime types to be available to R8 to link against.

@TWiStErRob
Copy link
Contributor Author

Oh, thank you for finding a source!

Yeah, the mordant issue is related as in that triggered my question.

I want to support running the R8 result on Java 11+, but use the latest Clikt/mordant. So far based on my tests it seems fine to use JDK 22 for R8.

Re the last sentence in the screenshot, I would hope that for synthetics that do contain bytecode from input, it uses the maximum version of all the inputs whose bytecode ends up in the synthesized class.

@TWiStErRob
Copy link
Contributor Author

I'll close this as there's no issue with this project. Should've opened a discussion 😅.

@TWiStErRob TWiStErRob closed this as not planned Won't fix, can't repro, duplicate, stale Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants