Menu

#149 Ability to filter classes using -keep syntax

Some sunny day
open
None
5
2014-05-06
2014-04-30
No

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.

Discussion

  • Eric Lafortune

    Eric Lafortune - 2014-04-30

    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.

     
  • Eric Lafortune

    Eric Lafortune - 2014-04-30

    Ticket moved from /p/proguard/bugs/515/

     
  • Eric Lafortune

    Eric Lafortune - 2014-04-30
    • assigned_to: Eric Lafortune
    • Group: v4.5 --> Next_Release_(example)
     

Log in to post a comment.