我想混淆打包成胖罐子的 Spring Boot 应用程序。
我的 proguard 配置:
-injars lib.jar
-outjars lib_out.jar
-libraryjars <java.home>/jmods/java.base.jmod(!**.jar;!module-info.class):<java.home>/lib/rt.jar
-printmapping myapplication.map
-dontoptimize
-dontshrink
-adaptresourcefilenames **.properties,**.xml,META-INF/MANIFEST.MF,META-INF/spring.*
-adaptresourcefilecontents **.properties,**.xml,META-INF/MANIFEST.MF,META-INF/spring.*
-keep class !com.myclass.mypackage.that.i.want.to.ofuscate.** { *; }
-keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod
但是处理我的 jar 会产生以下警告:
Warning: class [BOOT-INF/classes/com/myclass/mypackage/that/i/want/to/ofuscate/My.class] unexpectedly contains class [com.myclass.mypackage.that.i.want.to.obfuscate.My]