I'm building an android library. I have an interface:
public interface MyInterface {
public void onInitializationSuccess(MySession mySession, String name, String email);
public void onInitializationFailure();
}
I have a proguard rule to keep MyInterface:
-keep public class com.package.name.MyInterface { *; }
When I try to implement this library in another project and create MyInterface this is how android studio creates it:
new MyInterface() {
@Override
public void onInitializationSuccess(MySession mySession, String s, String s1) {
}
@Override
public void onInitializationFailure() {
}
}
I'm guessing 'mySession' name is kept because it's a custom class from the library (there's a proguard rule to keep it). I'd like to keep other two param names as well, so instead 's' and 's1' developer would see 'name' and 'email'. How can I do it without disabling proguard obfuscation for the whole project?
I know this question has been asked few times
here: Proguard keep interface method variable names
here: Proguard keep parameter names for interface and abstract class
and here: Proguard keep interface method paramternames
but the replies aren't really helpful.