# Room
# Room generates implementation classes via KSP; the generated impls are accessed
# reflectively at runtime, so the abstract database and annotated types must be kept.
-keep class * extends androidx.room.RoomDatabase { *; }
-keepclassmembers class * extends androidx.room.RoomDatabase {
    abstract *;
}
-keep @androidx.room.Entity class * { *; }
-keep @androidx.room.Dao interface * { *; }

# Media3
# RadioPlaybackService is declared in AndroidManifest.xml and instantiated by the system.
-keep class xyz.cottongin.radio247.service.RadioPlaybackService { *; }
# RadioPlayerAdapter extends SimpleBasePlayer; keep it so the player state machine
# callbacks are not stripped.
-keep class xyz.cottongin.radio247.service.RadioPlayerAdapter { *; }
-keep class * extends androidx.media3.session.MediaLibraryService { *; }
-keep class * extends androidx.media3.session.MediaSession$Callback { *; }
-keep class * extends androidx.media3.session.MediaLibrarySession$Callback { *; }

# Coil 3 - custom Transformation subclass
-keep class xyz.cottongin.radio247.ui.util.BlurTransformation { *; }

# Kotlin coroutines
# MainDispatcherFactory and CoroutineExceptionHandler are loaded via ServiceLoader /
# reflection; keepnames prevents renaming while still allowing shrinking.
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-keepclassmembernames class kotlinx.** {
    volatile <fields>;
}

# Suppress warnings for optional/transitive dependencies that are not present at runtime
-dontwarn org.slf4j.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**
