Proguard 混淆 Fat jar
我的应用程序 jar 包含 swing-layout.jar 中的类,其中包含 java 1.5 的免费布局管理器。在混淆过程中,我收到很多警告,例如
[proguard] Note: org.jdesktop.layout.SwingLayoutStyle accesses a field 'INDE NT' dynamically [proguard] Maybe this is program field 'org.jdesktop.layout.LayoutStyl e { int INDENT; }'
我希望 proguard 单独保留 org.jdesktop 类,并摆脱我尝试过
-keeppackagenames org.jdesktop.*
但不起作用的警告?
My application jar contains classes from swing-layout.jar which contains free layout manager for java 1.5. During obfuscation process i get a lot of warnings such as
[proguard] Note: org.jdesktop.layout.SwingLayoutStyle accesses a field 'INDE NT' dynamically [proguard] Maybe this is program field 'org.jdesktop.layout.LayoutStyl e { int INDENT; }'
I would like proguard to leave org.jdesktop classes alone, and get rid of the warnings i tried
-keeppackagenames org.jdesktop.*
but it did not work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
老问题,但是
-keep org.jdesktop.**
不适用于 proguard 4.6 - 需要添加:
-keep class org.jdesktop.**
以防万一有人和我一样被这个问题绊倒了。
old question, but
-keep org.jdesktop.**
did not work here with proguard 4.6 - need to add:
-keep class org.jdesktop.**
just in case someone stumbles over this question just as I did.
我想,你想要
注意那两颗星。从 文档 中:
-keeppackagenames 只是保留...包名称!您需要 -keep,它可以保护包中的事物的名称。
You want, I think,
Note the two stars. From the documentation:
-keeppackagenames just keeps... package names! You want -keep, which protects the names of things in packages.
如果您想忽略特定包下的所有内容,您可以这样做,
这将保留该包中的所有类以及所有字段和方法。
If you'd like to leave out everything under a specific package, you can do
This will keep all classes in that package, and all fields and methods.