Why does having proguard ignore a package not prevent the warnings related to that package?
Background:
I am attempting to apply proguard to a large project. Predictably, I have lots of warning like this:
Warning:net.fortuna.ical4j.model.CalendarFactory: can't find superclass or interface groovy.util.AbstractFactory
Warning:net.fortuna.ical4j.model.CalendarFactory: can't find superclass or interface groovy.lang.GroovyObject
Warning:net.fortuna.ical4j.model.ContentBuilder: can't find superclass or interface groovy.util.FactoryBuilderSupport
Warning:net.fortuna.ical4j.model.ParameterListFactory: can't find superclass or interface groovy.util.AbstractFactory
Warning:net.fortuna.ical4j.model.ParameterListFactory: can't find superclass or interface groovy.lang.GroovyObject
Warning:net.fortuna.ical4j.model.component.AbstractComponentFactory: can't find superclass or interface groovy.util.AbstractFactory
Warning:net.fortuna.ical4j.model.component.AbstractComponentFactory: can't find superclass or interface groovy.lang.GroovyObject
Warning:net.fortuna.ical4j.model.component.XComponentFactory: can't find superclass or interface groovy.util.AbstractFactory
Warning:net.fortuna.ical4j.model.component.XComponentFactory: can't find superclass or interface groovy.lang.GroovyObject
Warning:net.fortuna.ical4j.model.parameter.AbstractParameterFactory: can't find superclass or interface groovy.util.AbstractFactory
Warning:net.fortuna.ical4j.model.parameter.AbstractParameterFactory: can't find superclass or interface groovy.lang.GroovyObject
Warning:net.fortuna.ical4j.model.property.AbstractPropertyFactory: can't find superclass or interface groovy.util.AbstractFactory
I thought I could approach this by excluding these packages from proguard until my app runs with proguard enabled. Then, working package-by-package, I could figure out whether I should ignoring the warnings or exclude only the necessary pieces.
I used this example of how to exclude a package, adding
-keep class net.fortuna.ical4j.model.** { public protected private *; }
to my proguard rules file. However, I get the same warnings as before. I did find this which suggests using -keep
in combination with -dontwarn
, but I don't understand why having proguard ignore the package doesn't prevent the warnings all together.