Ability to filter classes using -keep syntax
Java class file shrinker, optimizer, obfuscator, and preverifier
Brought to you by:
guardsquare
It would be helpful if we could filter classes using the more flexible -keep syntax. For example, I am getting many warnings like:
[proguard] Warning: ch.qos.logback.classic.boolex.EvaluatorTemplate: can't find superclass or interface groovy.lang.GroovyObject
In this case, I'd like to filter all classes that extend groovy.*
because I know I won't need them.
Justification: In order to implement the same filter using the class path I would need to specify 10-20 different paths (the groovy-related classes are not isolated in any particular package).
To clarify: I expect this filter to get applied before checking for warnings.
I can see the use of such a feature, but there are some theoretical and practical snags. ProGuard prints out these warnings while initializing the class hierarchy and all other class dependencies. Options like -keep then depend on a valid class hierarchy. For instance, groovy.lang.GroovyObject needs to be present in order to specify templates that mention it. One could create a dummy groovy.lang.GroovyObject, but then the dependencies would be incomplete approximations. That could become confusing. I'll have to think about it.
Ticket moved from /p/proguard/bugs/515/