I would like to annotate some interfaces in my application with a custom @Keep
annotation and configure ProGuard so as to
- not obfuscate the annotated interface and its methods,
- not obfuscate implementations for those interface methods in implementing classes.
I tried something like
# Kept interfaces and all their methods
-keep interface @com.foo.bar.annotation.Keep * {
<methods>;
}
# Classes implementing kept interfaces
-keep class * implements @com.foo.bar.annotation.Keep *
but obviously the syntax is invalid. I tried other things, but the ProGuard documentation and its examples are not really clear about the exact syntax and what is possible under which circumstances.