Skip to content Skip to sidebar Skip to footer

Kotlin Aar Library W/ Proguard: How To Keep Only Class And Method Names?

I am building an android library (aar file) with Kotlin. I need to obfuscate the code in a way that the 3rd party user will see the class and method names, he must be able to use t

Solution 1:

In case anyone else struggle with this issue, this should do the trick in most cases (when not trying to obfuscate native methods):

-keepclasseswithmembernames class * {
     public <methods>; 
}

More about different keep options can be found here: Proguard keep rules

Post a Comment for "Kotlin Aar Library W/ Proguard: How To Keep Only Class And Method Names?"