Files
opendance-android/app/proguard-rules.pro
T

50 lines
1.8 KiB
Prolog
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# OpenDance Studio —— R8 / ProGuard 规则
#
# release 构建开启 minifyEnabled + shrinkResources。以下 keep 规则覆盖:
# - MediaPipe(大量 JNI 与反射,且 tasks-vision 的 AutoValue 生成类需保留)
# - OkHttp / Okio(平台相关实现按类名查找)
# - Kotlin 协程与元数据
# 删掉这些规则会导致 release 包在真机上运行时崩溃(debug 包不会暴露该问题)。
# ---------------------------------------------------------------- MediaPipe
-keep class com.google.mediapipe.** { *; }
-keep interface com.google.mediapipe.** { *; }
-dontwarn com.google.mediapipe.**
# MediaPipe 使用 AutoValue 生成不可变类,依赖注解与泛型签名
-keep class com.google.auto.value.** { *; }
-dontwarn com.google.auto.value.**
-keepclassmembers class * {
@com.google.auto.value.AutoValue.Builder <methods>;
}
# MediaPipe / TFLite 的 native 入口
-keepclasseswithmembernames class * {
native <methods>;
}
# protobuf(MediaPipe 依赖)
-keep class com.google.protobuf.** { *; }
-dontwarn com.google.protobuf.**
# ---------------------------------------------------------------- OkHttp / Okio
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**
-keep class okhttp3.internal.platform.** { *; }
-keep class org.conscrypt.** { *; }
-keep class org.bouncycastle.** { *; }
-keep class org.openjsse.** { *; }
# ---------------------------------------------------------------- Kotlin / 协程
-keepattributes Signature, InnerClasses, EnclosingMethod, *Annotation*
-keep class kotlin.Metadata { *; }
-dontwarn kotlin.**
-keepclassmembers class kotlinx.coroutines.** { volatile <fields>; }
# ---------------------------------------------------------------- AndroidX / Compose
-dontwarn androidx.**
-keep class androidx.camera.** { *; }