# ── Kotlin / Coroutines ───────────────────────────────────────────────── -dontwarn kotlinx.coroutines.** # ── Room ───────────────────────────────────────────────────────────────── -keep class * extends androidx.room.RoomDatabase { *; } -keep @androidx.room.Entity class * { *; } -keepclassmembers class * { @androidx.room.* ; } -dontwarn androidx.room.** # ── Gson / Serialization ───────────────────────────────────────────────── # Keep all data model classes — Gson uses reflection to access fields -keep class com.m57.hermescontrol.data.model.** { *; } -keep class com.m57.hermescontrol.data.ws.JsonRpc* { *; } -keep class com.m57.hermescontrol.data.ws.WsEvent* { *; } -keep class com.m57.hermescontrol.data.ws.WsMethods { *; } -keep class com.m57.hermescontrol.ui.chat.ChatMessage { *; } -keep class com.m57.hermescontrol.ui.chat.MessageRole { *; } -keep class com.m57.hermescontrol.ui.chat.ToolStatus { *; } # Generic type signatures used by serialization -keepattributes Signature -keepattributes *Annotation* -keepattributes EnclosingMethod -keepattributes InnerClasses # ── OkHttp / Retrofit ──────────────────────────────────────────────────── -dontwarn okhttp3.** -dontwarn okio.** -dontwarn retrofit2.** -keepattributes RuntimeVisibleAnnotations -keepattributes RuntimeInvisibleAnnotations -keepclassmembers,allowshrinking,allowobfuscation interface * { @retrofit2.http.* ; } # ── AndroidX Security Crypto ───────────────────────────────────────────── # EncryptedSharedPreferences / MasterKey resolve primitives via Tink's # reflection-based Registry. Without -keep, R8 obfuscates those classes and # token reads silently fail (401 on every API call, "Session expired"). -keep class androidx.security.crypto.** { *; } -keep class com.google.crypto.tink.** { *; } -dontwarn androidx.security.crypto.** # ── Tink / Error Prone ─────────────────────────────────────────────────── # Tink references com.google.errorprone.annotations.Immutable which isn't # shipped as a runtime dependency. Suppress the R8 missing-class error. -dontwarn com.google.errorprone.annotations.Immutable # ── Compose ─────────────────────────────────────────────────────────────── -dontwarn androidx.compose.** # ── BuildConfig ─────────────────────────────────────────────────────────── -keep class com.m57.hermescontrol.BuildConfig { *; } # ── Navigation (NavKey Names) ───────────────────────────────────────────── # Keep screen object class names because their simpleNames are used for bottom nav selection and storage. -keep class * extends androidx.navigation3.runtime.NavKey { *; }