diff --git a/app/proguard-rules.pro b/app/proguard-rules.pro index 3ced2aa..45f0965 100644 --- a/app/proguard-rules.pro +++ b/app/proguard-rules.pro @@ -21,13 +21,21 @@ #-renamesourcefileattribute SourceFile # Room --keep class * extends androidx.room.RoomDatabase +# Room instantiates its generated *_Impl classes reflectively; R8 full mode +# (AGP 9 default) strips the no-arg constructor unless explicitly kept. +-keep class * extends androidx.room.RoomDatabase { (); } -dontwarn androidx.room.paging.** -keep @androidx.room.Entity class * -keep class * { @androidx.room.PrimaryKey ; } +# Gson reflection: BackupManager serializes these models and the field names +# are the on-disk JSON schema of backup files. Without keeps R8 renames the +# fields and backups silently change format between build types. +-keep class cn.airnan.a2fair.data.entity.Token { ; } +-keep class cn.airnan.a2fair.core.backup.BackupData { ; } + # JNI -keepclasseswithmembernames class * { native ;