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:
21
LICENSE
Normal file
21
LICENSE
Normal 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
38
app/proguard-rules.pro
vendored
Normal 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.**
|
||||
Reference in New Issue
Block a user