I've created an annotation that should assist me to mark classes that should be kept in its entirety in the obfuscation step.
Then I would use the following proguard configuration to keep everything:
-keep @com.my.project.annotations.ProguardKeepEverything class * { *; }
So the following class and its members (incl. names) will be kept:
@ProguardKeepEverything
public class APublicModel {
private String aField;
}
But now I have inner classes like:
@ProguardKeepEverything
public class APublicModel {
private String aField;
public static class InnerPublicClass {
private String innerAField;
}
}
so I add the following rule:
-keep @com.my.project.annotations.ProguardKeepEverything class *$* { *; }
and also tryed
-keep @com.my.project.annotations.ProguardKeepEverything class *$** { *; }
But now it ONLY keeps the inner class (and name) itself but its fields and methods are obfuscated. How do I keep the methods and fields of inner classes from being obfuscated (ie. names are intact)?
I check if the classes are obfuscated with seed.txt
and apktool.
The following Questions only care about keeping the classe, not its methods: