-keepdirectories for a recursive match
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
Currently, to keep a directory foo/bar one must specify:
-keepdirectories foo/bar
By comparison,
-keepdirectories foo/bar/
will not work because of the trailing slash. This means that if you want to keep foo/bar and subdirectories you must specify:
-keepdirectories foo/bar
-keepdirectories foo/bar/**
Is it possible to improve this syntax such that
-keepdirectories foo/bar/
and
-keepdirectories foo/bar/**
both match foo/bar? This way users can simply specify:
-keepdirectories foo/bar/**
to indicate that foo/bar and subdirectories should be match, all in one statement.
If you decide against this new syntax, please update http://proguard.sourceforge.net/manual/usage.html#filefilters to indicate that a trailing slash will prevent a directory match.
It seems preferable to leave the distinction, so the user can specify subdirectories without the directory itself. The pattern matching is strictly based on the name strings, without interpreting the semantics of directories. I've clarified the documentation with an example, for the upcoming ProGuard 5.0 beta2.
Okay, thank you. I will review the updated documentation when the website is updated.