# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-dontwarn javax.annotation.Nullable


##---------------Begin: proguard configuration for Gson  ----------
# 保留 Gson 库本身
-keep class com.google.gson.** { *; }
-dontwarn com.google.gson.**

# 保留泛型签名信息
-keepattributes Signature

# 保留注解
-keepattributes *Annotation*

# 保留特定接口和类
-keep class * extends com.google.gson.TypeAdapter
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

# 保留特定字段
-keepclassmembers,allowobfuscation class * {
  @com.google.gson.annotations.SerializedName <fields>;
}
##---------------End: proguard configuration for Gson  ----------

-keep class com.squareup.okhttp.** { *; }


# 保持 Facebook SDK 的类和方法
-keep class com.facebook.** { *; }
-keep interface com.facebook.** { *; }

# 移除release日志
#-assumenosideeffects class android.util.Log {
#    public static *** d(...);
#    public static *** v(...);
#    public static *** i(...);
#    public static *** w(...);
#    public static *** e(...);
#}

# Adjust 防混淆
-keep class com.adjust.sdk.** { *; }
-keep class com.google.android.gms.common.ConnectionResult {
   int SUCCESS;
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
   com.google.android.gms.ads.identifier.AdvertisingIdClient$Info getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
   java.lang.String getId();
   boolean isLimitAdTrackingEnabled();
}
-keep public class com.android.installreferrer.** { *; }


-keep class kotlin.reflect.jvm.internal.** { *; }
-keepclassmembers class kotlin.reflect.jvm.internal.** { *; }

# 保留访问 assets 资源的方法
-keepclassmembers class * {
    public *** getAssets();
    public android.content.res.AssetManager getAssets();
}

# 保留伴生对象
-keepclassmembers class **$Companion { *; }

# 保留带默认参数的方法
-keepclassmembers class * {
    @kotlin.jvm.JvmOverloads <methods>;
}

# 保留注解
-keepattributes RuntimeVisibleAnnotations, RuntimeInvisibleAnnotations
-keepattributes *Annotation*

# =============== KOTLIN 核心保留规则 ===============
-keep class kotlin.** { *; }
-keep class kotlin.Metadata { *; }
-keep class kotlin.jvm.internal.** { *; }
-keep class kotlin.reflect.** { *; }
-dontwarn kotlin.**

# 保留 assets 目录下的所有 txt 文件
-keep class **.R$* {
    <fields>;
}

-keep class com.qjzep.irdlt.waxmu.** { *; }
-keep class com.ritoq.quickphone.bean.** { *; }

#pangle 防混淆
-keep class com.bytedance.sdk.** { *; }