Hi all,
I’m running an application that does not use Kotlin, but my dependencies do. From what I understand, using Kotlin will result in a “kotlin” directory in the root of the APK.
When I enable Proguard, this folder, along with some others such as “java”, “com”, etc are all removed, and when Kotlin code is executed during runtime, I see a crash
12-02 16:59:47.539 1270 1502 E AndroidRuntime: java.lang.AssertionError: Built-in class kotlin.Any is not found
12-02 16:59:47.539 1270 1502 E AndroidRuntime: at kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns$3.invoke(KotlinBuiltIns.java:113)
12-02 16:59:47.539 1270 1502 E AndroidRuntime: at kotlin.reflect.jvm.internal.impl.builtins.KotlinBuiltIns$3.invoke(KotlinBuiltIns.java:108)
I’ve configured my rules to literally keep everything, but the base folders in the APK gets removed. I’ve also tried with -keepdirectories, but same issue happens
-dontobfuscate
-dontoptimize
-dontshrink
-addconfigurationdebugging
-dontpreverify
-dontwarn ***
-keep class *** { *** *; <methods>; <init>(...);}
-keep interface *** { *** *; }
-keep @interface *** { *** *; }
-keep enum *** { *** *; }
-keepattributes ***
-optimizations !code/simplification/arithmetic,!code/simplification/cast,!code/allocation/variable,!field/*,!class/merging/*,!method/removal/*,!class/unboxing/enum
Please shed some light on how those folders are generated, and how I can configure them to not be removed. Thank you