chore: add ProGuard keep rules and MIT license

Add app/proguard-rules.pro with keep rules for Room entities/DAOs,
Media3 service and player classes, Coil BlurTransformation, and Kotlin
coroutines internals. Add MIT LICENSE file.

Made-with: Cursor
This commit is contained in:
cottongin
2026-03-18 13:41:31 -04:00
parent e03e32183b
commit 639cb99d1f
2 changed files with 59 additions and 0 deletions

38
app/proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,38 @@
# 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.**