|
| 1 | +# ────────────────────────────────────────────────────────────────────────────── |
| 2 | +# VentExpensePro — ProGuard / R8 Rules |
| 3 | +# ────────────────────────────────────────────────────────────────────────────── |
| 4 | + |
| 5 | +# ── Flutter Engine ──────────────────────────────────────────────────────────── |
| 6 | +-keep class io.flutter.app.** { *; } |
| 7 | +-keep class io.flutter.plugin.** { *; } |
| 8 | +-keep class io.flutter.util.** { *; } |
| 9 | +-keep class io.flutter.view.** { *; } |
| 10 | +-keep class io.flutter.** { *; } |
| 11 | +-keep class io.flutter.plugins.** { *; } |
| 12 | +-dontwarn io.flutter.embedding.** |
| 13 | + |
| 14 | +# ── Firebase Crashlytics ───────────────────────────────────────────────────── |
| 15 | +-keepattributes SourceFile,LineNumberTable # Readable stack traces |
| 16 | +-keep public class * extends java.lang.Exception # Keep custom exceptions |
| 17 | +-keep class com.google.firebase.crashlytics.** { *; } |
| 18 | +-dontwarn com.google.firebase.crashlytics.** |
| 19 | + |
| 20 | +# ── Firebase Core ──────────────────────────────────────────────────────────── |
| 21 | +-keep class com.google.firebase.** { *; } |
| 22 | +-dontwarn com.google.firebase.** |
| 23 | + |
| 24 | +# ── Google Play Services / Auth ────────────────────────────────────────────── |
| 25 | +-keep class com.google.android.gms.** { *; } |
| 26 | +-dontwarn com.google.android.gms.** |
| 27 | + |
| 28 | +# ── Google Drive API & HTTP Client ─────────────────────────────────────────── |
| 29 | +-keep class com.google.api.client.** { *; } |
| 30 | +-keep class com.google.api.services.drive.** { *; } |
| 31 | +-keep class com.google.http.** { *; } |
| 32 | +-dontwarn com.google.api.client.** |
| 33 | +-dontwarn com.google.api.services.** |
| 34 | +-dontwarn com.google.http.** |
| 35 | + |
| 36 | +# ── Gson (used by Google HTTP Client) ──────────────────────────────────────── |
| 37 | +-keepattributes Signature |
| 38 | +-keepattributes *Annotation* |
| 39 | +-dontwarn sun.misc.** |
| 40 | +-keep class com.google.gson.** { *; } |
| 41 | +-keep class * implements com.google.gson.TypeAdapterFactory |
| 42 | +-keep class * implements com.google.gson.JsonSerializer |
| 43 | +-keep class * implements com.google.gson.JsonDeserializer |
| 44 | +-keepclassmembers,allowobfuscation class * { |
| 45 | + @com.google.gson.annotations.SerializedName <fields>; |
| 46 | +} |
| 47 | + |
| 48 | +# ── SharedPreferences ──────────────────────────────────────────────────────── |
| 49 | +-keep class io.flutter.plugins.sharedpreferences.** { *; } |
| 50 | +-keep class androidx.datastore.** { *; } |
| 51 | +-dontwarn androidx.datastore.** |
| 52 | + |
| 53 | +# ── SQFlite (SQLite) ───────────────────────────────────────────────────────── |
| 54 | +-keep class com.tekartik.sqflite.** { *; } |
| 55 | +-dontwarn com.tekartik.sqflite.** |
| 56 | + |
| 57 | +# ── Path Provider ──────────────────────────────────────────────────────────── |
| 58 | +-keep class io.flutter.plugins.pathprovider.** { *; } |
| 59 | + |
| 60 | +# ── Share Plus ─────────────────────────────────────────────────────────────── |
| 61 | +-keep class dev.fluttercommunity.plus.share.** { *; } |
| 62 | +-dontwarn dev.fluttercommunity.plus.share.** |
| 63 | + |
| 64 | +# ── PDF Generation ─────────────────────────────────────────────────────────── |
| 65 | +-keep class com.ril.pdf_box.** { *; } |
| 66 | +-dontwarn com.ril.pdf_box.** |
| 67 | + |
| 68 | +# ── Kotlin ─────────────────────────────────────────────────────────────────── |
| 69 | +-keep class kotlin.Metadata { *; } |
| 70 | +-dontwarn kotlin.** |
| 71 | +-dontwarn kotlinx.** |
| 72 | + |
| 73 | +# ── Kotlin Serialization ──────────────────────────────────────────────────── |
| 74 | +-keepattributes *Annotation*, InnerClasses |
| 75 | +-dontnote kotlinx.serialization.AnnotationsKt |
| 76 | +-keepclassmembers class kotlinx.serialization.json.** { |
| 77 | + *** Companion; |
| 78 | +} |
| 79 | +-keepclasseswithmembers class kotlinx.serialization.json.** { |
| 80 | + kotlinx.serialization.KSerializer serializer(...); |
| 81 | +} |
| 82 | + |
| 83 | +# ── General ────────────────────────────────────────────────────────────────── |
| 84 | +-keepattributes *Annotation* |
| 85 | +-keepattributes Exceptions |
| 86 | +-keepattributes InnerClasses |
| 87 | +-keepattributes Signature |
| 88 | +-keepattributes EnclosingMethod |
| 89 | + |
| 90 | +# Suppress warnings for common third-party libraries |
| 91 | +-dontwarn javax.annotation.** |
| 92 | +-dontwarn org.codehaus.mojo.** |
| 93 | +-dontwarn org.conscrypt.** |
| 94 | +-dontwarn org.bouncycastle.** |
| 95 | +-dontwarn org.openjsse.** |
| 96 | +-dontwarn org.apache.http.** |
| 97 | +-dontwarn android.net.http.** |
0 commit comments