Hey guys, I’m writing a KMM library, previously with v1.6.21 but I’ve recently upgraded to 1.9.0. Wh...
m
Hey guys, I’m writing a KMM library, previously with v1.6.21 but I’ve recently upgraded to 1.9.0. What’s strange is my .class files that get compiled have changed from Kotlin to Java in 1.9.0. This is causing incompatibilities with code that subclass or implement interfaces from my KMM library since something like
abstract val view: View
gets changed to
View getView()
, which breaks some implementations. Any ideas on what changed that would cause my kotlin .class files to become java files in 1.9.0?
c
Not sure what your issue is, Kotlin files are always compiled to java’s bytecode for the JVM targets but you’d better ask in #multiplatform.
m
It seems how the system decompiles them changes though…The issue goes away for me when I downgrade to 1.7.20. .class files are converted to Kotlin
Fixed. It seems the issue was resolved by upgrading gradle to 7.5,
com.android.tools.build:gradle
to 7.4.0 and
com.android.library
to 7.4.2. I don’t quite understand why this interaction between versions exists, but that was the fix.