Proguard vs Annotations

前端 未结 5 576
忘了有多久
忘了有多久 2020-12-30 00:08

I have an app that uses ActiveAndroid, a database ORM library, that relies on annotations.

@Table(name=\"test\")
public class DatabaseItem extends ActiveReco         


        
5条回答
  •  灰色年华
    2020-12-30 00:44

    For those only using Gradle, the solution is very similar (note the single quotes around the Annotation):

    keep 'public class java.package.** { *; }'
    
    keepattributes '*Annotation*'
    

    This is especially useful if you are using JSON serialization annotations (e.g., Jackson or the like) in a vanilla Gradle project.

提交回复
热议问题