I want to obfuscate my app with ProGuard and I also want member of some inner classes to keep their names. This is because I use these classes in Jackson for converting to and from JSON. My source:
// this class mainly serves as a container for a group of related inner classes
public class MyOuterClass
{
public class IDontWantToKeepThisClassName1
{
public String IWantToKeepThisName1;
public float IWantToKeepThisName2;
}
public class IDontWantToKeepThisName2
{
public IDontWantToKeepThisClassName1 IWantToKeepThisName3;
public float IWantToKeepThisName4;
}
}
I hope that above code is self explanatory. I tried to achieve this with this command in proguard-project.txt
-keepclassmembernames class com.myapppackage.MyOuterClass$**
Yet this does not work. Inner class members are still obfuscated. It takes insane amount of time to test various options trying to guess correct options or syntax because each change requires package export to see if it works.