2026-06-16 20:16:47 -05:00
|
|
|
# ── Firebase ─────────────────────────────────────────────────────────────────
|
|
|
|
|
-keep class com.google.firebase.** { *; }
|
|
|
|
|
-keep class com.google.android.gms.** { *; }
|
|
|
|
|
-keepattributes Signature
|
|
|
|
|
|
|
|
|
|
# ── Hilt ─────────────────────────────────────────────────────────────────────
|
|
|
|
|
-keep class dagger.hilt.** { *; }
|
|
|
|
|
-keepclasseswithmembers class * {
|
|
|
|
|
@dagger.hilt.android.lifecycle.HiltViewModel <init>(...);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# ── Room ──────────────────────────────────────────────────────────────────────
|
|
|
|
|
-keep @androidx.room.Entity class * { *; }
|
|
|
|
|
-keep @androidx.room.Dao interface * { *; }
|
|
|
|
|
-keep @androidx.room.Database class * { *; }
|
|
|
|
|
|
|
|
|
|
# ── Domain models (used in Firestore manual mapping & local JSON) ─────────────
|
|
|
|
|
-keepclassmembers class app.closer.domain.model.** {
|
|
|
|
|
<fields>;
|
|
|
|
|
<init>(...);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# ── RevenueCat ────────────────────────────────────────────────────────────────
|
|
|
|
|
-keep class com.revenuecat.** { *; }
|
|
|
|
|
-dontwarn com.revenuecat.**
|
|
|
|
|
|
|
|
|
|
# ── Kotlin coroutines ────────────────────────────────────────────────────────
|
|
|
|
|
-keepclassmembernames class kotlinx.** {
|
|
|
|
|
volatile <fields>;
|
|
|
|
|
}
|
|
|
|
|
-dontwarn kotlinx.coroutines.**
|
|
|
|
|
|
|
|
|
|
# ── Crash reporting: preserve source file names and line numbers ─────────────
|
|
|
|
|
-keepattributes SourceFile,LineNumberTable
|
|
|
|
|
-keep public class * extends java.lang.Exception
|
|
|
|
|
-renamesourcefileattribute SourceFile
|
|
|
|
|
|
|
|
|
|
# ── Kotlin metadata (needed for reflection-free Kotlin code) ─────────────────
|
|
|
|
|
-keepattributes RuntimeVisibleAnnotations
|
|
|
|
|
-keepattributes RuntimeInvisibleAnnotations
|
|
|
|
|
-keepattributes *Annotation*
|
|
|
|
|
|
|
|
|
|
# ── Prevent stripping of BuildConfig ─────────────────────────────────────────
|
|
|
|
|
-keep class app.closer.BuildConfig { *; }
|
|
|
|
|
|
2026-06-21 09:49:02 -05:00
|
|
|
# ── Strip debug/verbose logs from release builds ─────────────────────────────
|
|
|
|
|
# Log.w / Log.e / Log.i are kept — useful for Crashlytics context.
|
|
|
|
|
-assumenosideeffects class android.util.Log {
|
|
|
|
|
public static int v(...);
|
|
|
|
|
public static int d(...);
|
|
|
|
|
public static boolean isLoggable(java.lang.String, int);
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-16 20:16:47 -05:00
|
|
|
# ── Suppress warnings for optional dependencies ──────────────────────────────
|
|
|
|
|
-dontwarn org.conscrypt.**
|
|
|
|
|
-dontwarn org.bouncycastle.**
|
|
|
|
|
-dontwarn org.openjsse.**
|