I'm obfuscating an executable jar using ProGuard version 5.3.3.
My jar contains other libraries which I do not want to obfuscate or optimize.
This is my ProGuard config:
-libraryjars 'C:\Program Files\Java\jre1.8.0_131\lib\rt.jar'
-injars myjar-debug.jar
-outjars myjar-release.jar
-skipnonpubliclibraryclasses
-dontoptimize
-dontshrink
-useuniqueclassmembernames
-keeppackagenames org.**
-keepattributes Exceptions,InnerClasses,Signature,Deprecated,SourceFile,LineNumberTable,LocalVariable*Table,*Annotation*,Synthetic,EnclosingMethod
-ignorewarnings
-keep class org.** { *; }
-keepclassmembers class org.** { *; }
-dontwarn org.**
-keepclasseswithmembers public class * {
public static void main(java.lang.String[]);
}
-keepclasseswithmembers class * {
native <methods>;
}
-keepclasseswithmembernames class * {
native <methods>;
}
The obfuscation works perfectly fine and there are no errors in executing the jar. However, if I compare the original jar and the obfuscated jar, I can see that ProGuard has modified classes within package org.**
. Most of the class files size is more than the original size.
I don't want ProGuard to modify these files at all. How can I completely exclude this package so that the binary of the class files in org.**
are exactly same?