Android ProGuard Learning

  • if all public methods may be callback methods
-keep class mypackage.MyCallbackClass {
    public <methods>;
}
-keepclasseswithmembernames class * {
    native <methods>;
}
-keep class mypackage.MyCallbackClass {
    void myCallbackMethod(java.lang.String);
}

https://stackoverflow.com/questions/7880107/in-proguard-how-to-preserve-a-set-of-classes-method-names
https://www.guardsquare.com/en/products/proguard/manual/