I'm building an android framework and I need to obfuscate and shrink the jar to ship it to users.
I'm using the proguard tool included in the android SDK and I have the following requirements for the output jar:
- keep all the classes included in the input jar, but obfuscate them.
- don't obfuscate the class names of the classes called in the `AndroidManifest.xml
- don't obfuscate the class name and public method names/attributes for the class that is used has an interface for the user, however do it for their contents.
To do so, I use the following configuration :
-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-dontpreverify
-verbose
-keep, allowobfuscation class com.company.*
-keepclassmembers, allowobfuscation class * {
*;
}
-keepnames class com.company.MyClass { *; }
-keepclassmembernames class com.company.MyClass {
public <methods>;
public <fields>;
#!private *; also tried this but it didn't work
}
However my private classes names and attributes still have the same name even though the content is obfuscated. Did I miss something in my wildcards?