When using the rule:
-keepclasseswithmembernames class * { }
ProGuard prints a warning suggesting that the rule has no effect:
Note: this option doesn't specify which class members to keep...
This way, the option simply won't have any effect.
However, this is not true for -keepclasseswithmembernames.
With an empty block, the rule still matches all classes, effectively preserving all class names and preventing class-name obfuscation.
This behavior contradicts the warning message, which implies the rule is harmless.
A minimal reproducible example and explanation is here
Expected Behavior
ProGuard should warn that:
An empty block in -keepclasseswithmembernames does preserve class names,
And therefore affects obfuscation.
It could be useful if it said something like
Warning: empty member block in '-keepclasseswithmembernames' will preserve
class names for all matching classes.
Why This Matters
The current warning is misleading and can cause developers to unknowingly disable class-name obfuscation across their entire project.
When using the rule:
-keepclasseswithmembernames class * { }ProGuard prints a warning suggesting that the rule has no effect:
Note: this option doesn't specify which class members to keep...
This way, the option simply won't have any effect.
However, this is not true for
-keepclasseswithmembernames.With an empty block, the rule still matches all classes, effectively preserving all class names and preventing class-name obfuscation.
This behavior contradicts the warning message, which implies the rule is harmless.
A minimal reproducible example and explanation is here
Expected Behavior
ProGuard should warn that:
An empty block in
-keepclasseswithmembernamesdoes preserve class names,And therefore affects obfuscation.
It could be useful if it said something like
Why This Matters
The current warning is misleading and can cause developers to unknowingly disable class-name obfuscation across their entire project.