Skip to content Skip to sidebar Skip to footer

Tell Proguard To Keep Annotation On Methods

I'm using my own annotation: @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.METHOD, ElementType.TYPE}) public @interface Loggable { } and obfuscate using Proguard. I use

Solution 1:

You need to use keepclassmembers parameter:

-keepclassmembers class ** {
  @com.yourpackage.Loggable public *;
}

Post a Comment for "Tell Proguard To Keep Annotation On Methods"