Files
lumaplayer/app/proguard-rules.pro
T
beyond 3670466a65 fix: 第一轮性能优化 — R8启用、协程泄漏修复、@Immutable注解、状态提取、并行化
- Release build 启用 R8/ProGuard + 新建 proguard-rules.pro
- MediaDetailScreen: MainScope → rememberCoroutineScope
- AppNavHost: openDetail/openHome lambda 记忆化
- VideoPlayerScreen: 提取 PlayerStatusBar 独立 Composable
- LibraryScreen: nowMillis 下沉到 ServerStatusLine 内部
- 8个核心数据类添加 @Immutable 注解
- TmdbCalendar: coroutineScope+async 并行化 season 请求
- SearchScreen: derivedStateOf 正确观察 SnapshotStateList
- HomeScreen: MediaPoster/ContinueWatchingPoster ImageRequest remember
- MediaDetailScreen: cast/recommendations/resources LazyRow 添加 key
- RecordsScreen: LaunchedEffect key 用 hashCode 替代 joinToString
2026-09-06 13:30:56 +08:00

64 lines
2.5 KiB
Prolog

# ── Room entities & DAOs (reflection-based by Room) ──
-keep class com.example.myapplication.data.ServerEntity { *; }
-keep class com.example.myapplication.data.FavoriteEntity { *; }
-keep class com.example.myapplication.data.WatchlistEntity { *; }
-keep class com.example.myapplication.data.IconLibraryEntity { *; }
-keep class com.example.myapplication.data.*Dao { *; }
-keep class com.example.myapplication.data.AppDatabase { *; }
# ── Gson / Retrofit (keep serialized field names) ──
-keepattributes Signature
-keepattributes *Annotation*
-dontwarn sun.misc.**
-keep class com.google.gson.** { *; }
-keep class retrofit2.** { *; }
-keepclassmembers,allowobfuscation class * {
@com.google.gson.annotations.SerializedName <fields>;
}
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken
# ── Keep Emby API models (Gson deserialization) ──
-keep class com.example.myapplication.data.EmbyItem { *; }
-keep class com.example.myapplication.data.EmbyServer { *; }
-keep class com.example.myapplication.data.EmbyPerson { *; }
-keep class com.example.myapplication.data.EmbyMediaStream { *; }
-keep class com.example.myapplication.data.EmbyMediaSource { *; }
-keep class com.example.myapplication.data.EmbyChapter { *; }
-keep class com.example.myapplication.data.EmbyUserData { *; }
-keep class com.example.myapplication.data.EmbyNamedReference { *; }
-keep class com.example.myapplication.data.EmbyAuthRequest { *; }
-keep class com.example.myapplication.data.EmbyAuthResponse { *; }
-keep class com.example.myapplication.data.EmbyUser { *; }
-keep class com.example.myapplication.data.EmbyMediaFoldersResponse { *; }
-keep class com.example.myapplication.data.EmbyMediaFolder { *; }
-keep class com.example.myapplication.data.EmbyItemsResponse { *; }
-keep class com.example.myapplication.data.EmbyPlaybackInfoResponse { *; }
-keep class com.example.myapplication.data.EmbyResourceStats { *; }
# ── OkHttp ──
-dontwarn okhttp3.**
-dontwarn okio.**
-keep class okhttp3.** { *; }
# ── OkHttp Logging Interceptor ──
-dontwarn okhttp3.logging.**
# ── Coil ──
-dontwarn coil.**
# ── Media3 / ExoPlayer ──
-keep class androidx.media3.** { *; }
-dontwarn androidx.media3.**
# ── Kyant Backdrop ──
-keep class com.kyant.backdrop.** { *; }
-dontwarn com.kyant.backdrop.**
# ── Miuix ──
-keep class top.yukonga.miuix.** { *; }
-dontwarn top.yukonga.miuix.**
# ── Palette ──
-keep class androidx.palette.** { *; }