# Hilt
-keep class * extends dagger.hilt.android.lifecycle.HiltViewModel
-keep class dagger.hilt.** { *; }
-keep class javax.inject.** { *; }

# Retrofit / OkHttp
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepattributes AnnotationDefault
-keepclassmembers,allowshrinking,allowobfuscation interface * {
    @retrofit2.http.* <methods>;
}
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn javax.annotation.**
-dontwarn kotlin.Unit
-dontwarn retrofit2.KotlinExtensions
-dontwarn retrofit2.KotlinExtensions$*

# kotlinx.serialization
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.AnnotationsKt
-keep,includedescriptorclasses class com.jishisongfu.duobibi.**$$serializer { *; }
-keepclassmembers class com.jishisongfu.duobibi.** {
    *** Companion;
}
-keepclasseswithmembers class com.jishisongfu.duobibi.** {
    kotlinx.serialization.KSerializer serializer(...);
}

# Room
-keep class * extends androidx.room.RoomDatabase
-keep @androidx.room.Entity class *
-dontwarn androidx.room.paging.**

# Compose
-keep class androidx.compose.runtime.** { *; }

# 小米推送:业务方继承的 PushMessageReceiver 子类不能被 R8 重命名,否则系统反射调不到回调
-keep class com.jishisongfu.duobibi.push.** { *; }

# 心跳:HeartbeatReceiver 系统反射实例化;Payload 走 kotlinx.serialization
-keep class com.jishisongfu.duobibi.heartbeat.** { *; }

# 极光一键登录(JVerification + JCore + 三大运营商 SDK 反射调用)
# 来源:极光官方混淆配置。release 包混淆 SDK 内部类会让授权页拉起失败/无回调。
-dontwarn cn.jpush.**
-keep class cn.jpush.** { *; }
-dontwarn cn.jiguang.**
-keep class cn.jiguang.** { *; }
-dontwarn cn.com.chinatelecom.**
-keep class cn.com.chinatelecom.** { *; }
-dontwarn com.ct.**
-keep class com.ct.** { *; }
-dontwarn com.cmic.**
-keep class com.cmic.** { *; }
-dontwarn com.unicom.**
-keep class com.unicom.** { *; }
-dontwarn com.sdk.**
-keep class com.sdk.** { *; }
