When compiling release builds with Kotlin 2.3.0 I ...
# android
t
When compiling release builds with Kotlin 2.3.0 I get
Copy code
Execution failed for task ':app:produceReleaseComposeMapping'.
> A failure occurred while executing org.jetbrains.kotlin.compose.compiler.gradle.internal.ProduceMappingFileTask$Action
   > Unsupported class file major version 69
I checked all the intermediate jars and everything and nothing is actually targeting java 25 all is properly forced to Java 17. Any idea how I can find the culprit and what I need to change to ensure Kotlin 2.3.0 does not generate Java 25 code ?
k
Are you using bouncy castle? I chased this down yesterday...I think it's a bug in the kotlin compose plug-in. Downgrading to bouncy castle 1.78.1 worked around it...
t
Thanks. Yes I am, will do some tests when back at computer. But how the ... did you figure out that one ? (In case it's something else and I do not spend another couple of hours in pure vain)
k
Looked through all the dependencies to find ones w/ JDK25 bytecode (after verifying that the project used JDK21 to build and set the target to JDK17...the ProduceMappingFileTasktask is trying to look through all the dependencies for some reason. This is a regression from Kotlin 2.2.21...I'll see if I can write up a bug report for Jetbrains.
โค๏ธ 1
t
And it is bouncy, thanks again.
๐Ÿ‘ 1
k
Filed: https://youtrack.jetbrains.com/issue/CMP-9446/Unsupported-class-file-major-version-69-with-Kotlin-2.3-and-produceReleaseComposeMapping-task No luck creating a small repro project unfortunately, so if you have more info on how to repro, please add more info to that youtrack issue.
t
Unfortunately I don't have much more, this is an very large app with tons of deps hundreds of modules, I was not even able to find out bouncy as it's a dep of a dep of a dep that I only updated a long time ago due to a security issue I think.
e
@kenkyee did you automate the dependency check for bytecode?
Because looks like I have some other dependencies on higher bytecode level
k
sorta...used Claude and it grabbed dependencies, unzipped them, and then grepped through them while I was watching it ๐Ÿ˜‚
The good news is I gave Jetbrains a small repro...should be fixed in 2.3.1 ๐Ÿคž
๐Ÿ‘๐Ÿผ 1
e
I did same - asked claude to check my gradle dependency. We have one more that is compiler with Java 24. Which is also an issue.
๐Ÿ‘ 1
k
Which dep is it? Would be good to have a list...
e
Ah, that is our internal issue - byte buddy was slipping in production code
I mean dexmaker probably still ships with it. But that only for android tests and should not be minified (probably).
๐Ÿ‘ 1
k
The fix on jetbrains side is to use a newer version of asm that can read jdk25 bytecode. Claude was trying to force upgrade that transitive dep for me without luck.
๐Ÿ‘๐Ÿผ 1
e
JB or Google, but it doesn't matter
s
These tasks can be disabled with:
Copy code
composeCompiler {
    includeComposeMappingFile.set(false)
}
213 Views