开发者

how to obfucate dependant .jar in Proguard?

I have a Jar library called BizLogic.jar and I am referring to it on my UI project. So when I obfuscate, I want to obfuscate BizLogic.jar first and then UI without breaking any refer开发者_如何转开发ences between them?

Is this possible with Proguard ? If not, Any other product that can support this ?

Thanks


The most robust solution would be to process both jars at the same time, but to keep the output in separate jars:

-injars  UI.jar
-outjars UI_processed.jar
-injars  BizLogic.jar
-outjars BizLogic_out.jar

or with an output directory

-injars  UI.jar
-injars  BizLogic.jar
-outjars out

The UI code and the business code will then be consistent.

Alternatively, you can apply incremental obfuscation:

1) First process BizLogic.jar with these additional options:

-printmapping BizJar.map
-dontoptimize
-useuniqueclassmembernames

2) Then process UI.jar with this additional option:

-applymapping BizJar.map

Incremental obfuscation is more complex and sometimes tricky to get right.

All this and more is explained in the ProGuard manual.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜