在使用Proguard进行混淆处理时,如何从罐子中排除特定的罐子? [英] How to exclude specific jars from injars during obfuscation using proguard?

查看:128
本文介绍了在使用Proguard进行混淆处理时,如何从罐子中排除特定的罐子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的 Application \ WEB-INF \ lib

abc.jar 视为我不想混淆的外部jar之一

Consider abc.jar as one of my external jar, which i do not want to obfuscate

那么我可以像下面这样在我的proguard配置中使用过滤器来排除吗?

So can i exclude as like below using filter in my proguard configuration ?

-injars C:\ Application \ WEB-INF \ lib(!abc.jar)

如果我对injar选项过滤器方法进行上述操作,则abc.jar也会变得模糊.请指出我要去哪里错了?如何避免混淆呢?

If i do as above for injar option filter means, abc.jar is also getting obfuscated. Please suggest where i am going wrong ? How to avoid obfuscating it ?

推荐答案

您应该使用-injars指定要处理的代码,并使用-libraryjars指定要保持不变的基础代码.这样的事情可能会起作用:

You should use -injars to specify code that you want to be processed, and -libraryjars to specify underlying code that you want to remain unchanged. Something like this may work:

-injars      C:/Application/WEB-INF/lib/mycode.jar
-libraryjars C:/Application/WEB-INF/lib(!mycode.jar;)

请注意jar名称过滤器和(空)类名称过滤器之间的分号.

Note the semi-colon between the jar name filter and the (empty) class name filter.

这篇关于在使用Proguard进行混淆处理时,如何从罐子中排除特定的罐子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆