Question
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?
Solution
You want, I think,
-keep org.jdesktop.**
Note the two stars. From the documentation:
* matches any part of a name not containing the package separator or directory separator.
** matches any part of a name, possibly containing any number of package separators or directory separators.
-keeppackagenames just keeps... package names! You want -keep, which protects the names of things in packages.
OTHER TIPS
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.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow