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

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 cottongin
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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.**