如何告诉 Proguard 混淆特定的死代码
我的 Java 项目中的代码似乎已死,但它在其他地方被调用。我如何告诉 Proguard 在收缩阶段忽略它并仍然对其进行混淆?
看来你可以缩小或不缩小(所有代码或什么都没有)。有没有办法不缩小特定的类成员名称?
I have code that appears dead in its Java project, but it's being called elsewhere. How do I tell Proguard to ignore it during the shrinking stage and still obfuscate it?
It seems that you can either shrink or not shrink (all code or nothing). Is there a way to not shrink on specific class member names?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以保留入口点,但仍然使用选项
-keep,allowobfuscation
对其进行混淆。但这是非常不寻常的,因为将它们的名称更改为无意义的字符串实际上使它们很难使用。参见ProGuard手册>使用方法> 保留选项
You can preserve entry points but still obfuscate them with the option
-keep,allowobfuscation
. That is very unusual though, since changing their names to meaningless strings makes it practically very difficult to use them.See ProGuard manual > Usage > Keep options