问题
I am using following options with proguard plugin. I expect all obfuscated class to be in 'com.xProject.z' folder but I find them spread in other folders as well. Does somebody know why?
<options>
<option>-repackageclasses 'com.xProject.z'</option>
<option>-dontshrink</option>
<option>-dontoptimize</option>
<option>-dontskipnonpubliclibraryclassmembers</option>
<option>-dontskipnonpubliclibraryclasses</option>
<option>-keepattributes</option>
<option>-keepclasseswithmembers public class * {public static void
main(java.lang.String[]);}</option>
<option>-keepclassmembernames class * {java.lang.Class class$(*);}
</option>
回答1:
Some classes aren't moved to the specified package because your configuration preserves their names. Some more classes can't be moved because they access package visible classes, fields, or methods in the first set of classes (or the other way around). You can relax this constraint with allowaccessmodification
.
来源:https://stackoverflow.com/questions/16141319/i-am-using-repackageclasses-my-pdt-z-option-of-proguard-plugin-but-obfuscate