Jani
Jani

Reputation: 1490

Proguard keep interface method variable names

I'm trying to prevent proguard from obfuscating interface method variable names. My proguard.pro has the following configurations but still the method variables appear as a, b etc.

-keep public class * { public *; }

-keepclassmembers class * { public *; }

-keepattributes Exceptions,InnerClasses,Signature -keepparameternames -keep public interface com.test.listener.MyListener { *; }

Upvotes: 8

Views: 3980

Answers (2)

nicholaus mwansile
nicholaus mwansile

Reputation: 1

    -keep public interface com.yourpackqge.yourapp.**{*;}

This works for me

Upvotes: 0

Kingfisher Phuoc
Kingfisher Phuoc

Reputation: 8190

-keep interface com.yourpackage.**{*;} is what you need. It will keep all your interface's name and methods.

Upvotes: 1

Related Questions