Sorry for the answer to my own question, but I just accidentally ran into a solution while playing. This is actually much simpler than I thought:
# Annotated interfaces (including methods which are also kept in implementing classes) -keep @com.foo.bar.annotation.Keep interface * { *; }
Obviously, it was wrong to specify <methods> in the interface clause, perhaps because ProGuard only filters to implement the actual methods, and not just the method declarations that can be found in the interface declarations.
The above syntax seems to support the full interface (class name, method names) plus all the implementation method names, which is logical if I think about it, because if I implement the interface, I cannot change (obfuscate) the method names in any case.
kriegaex
source share