简体   繁体   中英

How to make Proguard to obfuscate jars within a jar file

I have a run-able java jar file let's call it masterProgram.jar . Inside this masterProgram.jar if I extract it using 7Zip or WinRAR there are other jars, lets call it lib1.jar, lib2.jar .

Proguard managed to obfuscated the master jar, but when I look-inside the lib jars are not. and because of this the program (masterProgram.jar) breaks at a certain point. I also already set overloadaggressively option in my condig.

I'm calling the proguard.jar through an ant build.xml. and here is my config file config.proguard

-injars 'masterProgram.jar'

-target 1.7
-dontshrink

-dontoptimize
-allowaccessmodification
-printmapping dataprintmap.txt
-overloadaggressively
-useuniqueclassmembernames
-repackageclasses ''
-keepattributes Exceptions,Innerclasses,Signature,Deprecated,*Annotation*,Synthetic
-renamesourcefileattribute SourceFile
-dontnote
-printseeds dataseed.txt
-dontskipnonpubliclibraryclasses

Jars inside jars are not really how jars are supposed to work. You'll need to rearrange things to make ProGuard able to deal with things. ProGuard has no way to deal with jars in jars because that's not how jars are intended to be used.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM