Trimming Unused Code - RetroGuard Documentation
[RetroGuard-v2.1.x and later]
RetroGuard can remove unused classes during obfuscation. When including a Java library in your obfuscated jar, large parts of the library may be unused by your particular application. These unused methods, fields, and even whole classes add unnecessary bulk to your deployed software. To have RetroGuard trim this unused code during obfuscation, add a script line:
.option Trim
Since this trimming occurs at the Java class level some of the results, while correct, may be unexpected. In particular, references to static final fields (constants) are usually optimized away during compilation. These fields will therefore be removed even though they seem to be referenced in the Java source. This has no adverse effect at the Java class-file level. Trim and Patch FilesUse of Trim and ReflectionRetroGuard's
| ||||||||||||
| ||||||||||||||||||||