# Add project specific ProGuard rules here. # You can control the set of applied configuration files using the # proguardFiles setting in build.gradle.kts. # # 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 # Keep `Companion` object fields of serializable classes. # This avoids serializer lookup through `getDeclaredClasses` as done for named companion objects. -if @kotlinx.serialization.Serializable class ** -keepclassmembers class <1> { static <1>$Companion Companion; } # Keep `serializer()` on companion objects (both default and named) of serializable classes. -if @kotlinx.serialization.Serializable class ** { static **$* *; } -keepclassmembers class <2>$<3> { kotlinx.serialization.KSerializer serializer(...); } # Keep `INSTANCE.serializer()` of serializable objects. -if @kotlinx.serialization.Serializable class ** { public static ** INSTANCE; } -keepclassmembers class <1> { public static <1> INSTANCE; kotlinx.serialization.KSerializer serializer(...); } # @Serializable and @Polymorphic are used at runtime for polymorphic serialization. -keepattributes RuntimeVisibleAnnotations,AnnotationDefault # Don't print notes about potential mistakes or omissions in the configuration for kotlinx-serialization classes # See also https://github.com/Kotlin/kotlinx.serialization/issues/1900 -dontnote kotlinx.serialization.** # Serialization core uses `java.lang.ClassValue` for caching inside these specified classes. # If there is no `java.lang.ClassValue` (for example, in Android), then R8/ProGuard will print a warning. # However, since in this case they will not be used, we can disable these warnings -dontwarn kotlinx.serialization.internal.ClassValueReferences # 保留WebRTC的接口 -keep interface org.webrtc.** { *; } # 保留WebRTC的枚举类型 -keep enum org.webrtc.** { *; } # 保留WebRTC的常量 -keepclassmembers class org.webrtc.** { static ; } # 保留WebRTC的类和方法 -keep class org.webrtc.** { *; } # 保留WebRTC的native方法 -keepclasseswithmembernames class * { native ; } # 保留WebRTC的类和方法,防止被混淆 -keepclassmembers class org.webrtc.** { (...); (...); ** *(...); } -keep interface io.minio.** { *; } -keep enum io.minio.** { *; } -keepclassmembers class io.minio.** { static ; } -keep class io.minio.** { *; } -keepclassmembers class io.minio.** { (...); (...); ** *(...); } -keep interface com.bea.xml.stream.** { *; } -keep enum com.bea.xml.stream.** { *; } -keepclassmembers class com.bea.xml.stream.** { static ; } -keep class com.bea.xml.stream.** { *; } -keepclassmembers class com.bea.xml.stream.** { (...); (...); ** *(...); } -keep class org.simpleframework.xml.**{ *; } -dontwarn edu.umd.cs.findbugs.annotations.SuppressFBWarnings -dontwarn org.bouncycastle.jsse.BCSSLParameters -dontwarn org.bouncycastle.jsse.BCSSLSocket -dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider -dontwarn org.conscrypt.Conscrypt$Version -dontwarn org.conscrypt.Conscrypt -dontwarn org.conscrypt.ConscryptHostnameVerifier -dontwarn org.openjsse.javax.net.ssl.SSLParameters -dontwarn org.openjsse.javax.net.ssl.SSLSocket -dontwarn org.openjsse.net.ssl.OpenJSSE -dontwarn org.slf4j.impl.StaticLoggerBinder -dontwarn java.beans.ConstructorProperties -keep class com.baidu.** {*;} -keep class vi.com.** {*;} -keep class com.baidu.vi.** {*;} -dontwarn com.baidu.** # Retrofit does reflection on generic parameters. InnerClasses is required to use Signature and # EnclosingMethod is required to use InnerClasses. -keepattributes Signature, InnerClasses, EnclosingMethod # Retrofit does reflection on method and parameter annotations. -keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations # Keep annotation default values (e.g., retrofit2.http.Field.encoded). -keepattributes AnnotationDefault # Retain service method parameters when optimizing. -keepclassmembers,allowshrinking,allowobfuscation interface * { @retrofit2.http.* ; } # Ignore annotation used for build tooling. -dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement # Ignore JSR 305 annotations for embedding nullability information. -dontwarn javax.annotation.** # Guarded by a NoClassDefFoundError try/catch and only used when on the classpath. -dontwarn kotlin.Unit # Top-level functions that can only be used by Kotlin. -dontwarn retrofit2.KotlinExtensions -dontwarn retrofit2.KotlinExtensions$* # With R8 full mode, it sees no subtypes of Retrofit interfaces since they are created with a Proxy # and replaces all potential values with null. Explicitly keeping the interfaces prevents this. -if interface * { @retrofit2.http.* ; } -keep,allowobfuscation interface <1> # Keep inherited services. -if interface * { @retrofit2.http.* ; } -keep,allowobfuscation interface * extends <1> # Keep generic signature of Call, Response (R8 full mode strips signatures from non-kept items). -keep,allowobfuscation,allowshrinking interface retrofit2.Call -keep,allowobfuscation,allowshrinking class retrofit2.Response # With R8 full mode generic signatures are stripped for classes that are not # kept. Suspend functions are wrapped in continuations where the type argument # is used. -keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation #高德地图SDK配置 -keep class com.amap.api.maps.**{*;} -keep class com.autonavi.**{*;} -keep class com.amap.api.trace.**{*;} #高德等位SDK配置 -keep class com.amap.api.location.**{*;} -keep class com.amap.api.fence.**{*;} -keep class com.loc.**{*;} -keep class com.autonavi.aps.amapapi.model.**{*;}