# Project-specific R8/ProGuard rules for release builds. # Keep reflection/generic metadata used by Retrofit + Moshi. -keepattributes Signature,InnerClasses,EnclosingMethod -keepattributes RuntimeVisibleAnnotations,RuntimeVisibleParameterAnnotations,AnnotationDefault -keep class kotlin.Metadata { *; } # Keep Retrofit service interfaces and HTTP method annotations. -keep,allowobfuscation interface * { @retrofit2.http.* ; } # Retrofit + R8 full mode: keep interfaces with HTTP methods and suspend continuation generics. -if interface * { @retrofit2.http.* ; } -keep,allowobfuscation interface <1> -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation # Avoid Retrofit generic signature loss on release builds for our API interface. -keep interface de.harheimertc.data.ApiService { *; } -keepclassmembers interface de.harheimertc.data.ApiService { *; } # Keep app DTO/request/response models used via Moshi reflection. -keep class de.harheimertc.data.*Dto { *; } -keep class de.harheimertc.data.*Request { *; } -keep class de.harheimertc.data.*Response { *; } # Keep fields annotated with @Json names. -keepclassmembers class * { @com.squareup.moshi.Json ; } # Keep WorkManager + Room generated classes used reflectively at startup. -keep class * extends androidx.work.ListenableWorker { (android.content.Context, androidx.work.WorkerParameters); } -keep class androidx.work.impl.WorkDatabase_Impl { *; } -keep class * extends androidx.room.RoomDatabase { *; }