如何仅混淆 com.foo.* 和 com.bar.* (ProGuard)?
我只想混淆一些包:
com.foo.*
com.bar.*
我已经尝试过了
-keepclasseswithmembers class **, !com.foo.**, !com.bar.** { *; }
,
-keepclasseswithmembers class !com.foo.** { *; }
-keepclasseswithmembers class !com.bar.** { *; }
在这两种情况下,来自 com.foo.* 和 com.bar.* 的类没有被混淆。
I want to obfuscate only some packages:
com.foo.*
com.bar.*
I have tried
-keepclasseswithmembers class **, !com.foo.**, !com.bar.** { *; }
and
-keepclasseswithmembers class !com.foo.** { *; }
-keepclasseswithmembers class !com.bar.** { *; }
In both cases the classes from com.foo.* and com.bar.* was NOT obfuscated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该有效
您可以在以下位置找到各种 -keep 选项的摘要:
https://www.guardsquare.com/manual/configuration/usage#keepoptions
您可以在以下位置找到 ProGuard 正则表达式的解释:
https://www.guardsquare.com/manual/configuration/usage#filters
This should work
You can find a summary of the various -keep options at
https://www.guardsquare.com/manual/configuration/usage#keepoptions
You can find the explanation of ProGuard's regular expressions at
https://www.guardsquare.com/manual/configuration/usage#filters