Proguard vs Annotations

前端 未结 5 543
忘了有多久
忘了有多久 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:38

    This what worked in my case:

    -keep class com.activeandroid.** { *; }
    -keep class com.activeandroid.**.** { *; }
    -keep class * extends com.activeandroid.Model
    -keep class * extends com.activeandroid.serializer.TypeSerializer
    -keep public class * extends com.activeandroid.ActiveRecordBase
    
    -keepattributes Column
    -keepattributes Table
    -keepattributes *Annotation*
    -keepclasseswithmembers class * { @com.activeandroid.annotation.Column ; }
    

提交回复
热议问题