Armando Bueno
03/20/2025, 12:42 PM.kotlin_module
file inside the META-INF folder is correctly included in the generated AAR file, and the library is recognized as Kotlin.
However, upon updating to a higher version of either AGP or Kotlin, I've noticed an issue:
• After applying Proguard, the .kotlin_module
file disappears from the META-INF folder within classes.jar
inside the AAR.
• Consequently, the library is recognized as Java instead of Kotlin upon consumption.
If I disable Proguard, everything functions correctly, and the .kotlin_module
file remains present, but disabling Proguard permanently is not an option for us.
I've already tried adding the following Proguard rule without success:
-keep class kotlin.Metadata
Could you please advise on how to resolve this issue, or indicate if there's a known solution or workaround?
Thank you very much for your assistance!Armando Bueno
03/20/2025, 2:59 PM# Add this option to tell ProGuard to keep and adapt Kotlin metadata
-keep class kotlin.Metadata { *; }
-keepattributes *Annotation*, InnerClasses
-keepnames class * {
@kotlin.Metadata *;
}
I'm trying this.