Reputation: 2540
I want to keep the class name and class fields names of all classes that have my custom Annotation:
@Retention(CLASS)
@Target(ElementType.TYPE)
public @interface DoNotObfuscate {
}
I tried this:
-keep @com.mypackage.DoNotObfuscate public class *
but that did not work.
Upvotes: 4
Views: 1688
Reputation: 13
In order to keep class fields you should add "{*;}" at the end:
-keep @com.mypackage.DoNotObfuscate public class * {*;}
Upvotes: 1