# 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 # self -keep class li.songe.**{*;} -keep interface li.songe.**{*;} -keepattributes *Annotation*,Signature,InnerClasses,EnclosingMethod -keep, allowobfuscation, allowoptimization @kotlinx.serialization.Serializable class * {*;} ## Android architecture components: Lifecycle # LifecycleObserver's empty constructor is considered to be unused by proguard -keepclassmembers class * implements androidx.lifecycle.LifecycleObserver { (...); } # ViewModel's empty constructor is considered to be unused by proguard -keepclassmembers class * extends androidx.lifecycle.ViewModel { (...); } # keep methods annotated with @OnLifecycleEvent even if they seem to be unused # (Mostly for LiveData.LifecycleBoundObserver.onStateChange(), but who knows) -keepclassmembers class * { @androidx.lifecycle.OnLifecycleEvent *; } # https://github.com/ktorio/ktor/issues/379 -keep class kotlin.reflect.jvm.internal.** { *; } # https://github.com/ktorio/ktor-documentation/blob/2.3.6/codeSnippets/snippets/proguard/proguard.pro -keep class io.ktor.server.cio.EngineMain { *; } -keep class io.ktor.server.config.HoconConfigLoader { *; } -keep class io.ktor.serialization.kotlinx.json.KotlinxSerializationJsonExtensionProvider { *; } # kotlin -keep class kotlin.** { *; } -keep class kotlin.Metadata { *; } -keep class kotlin.text.RegexOption { *; } -dontwarn kotlin.** -keepclassmembers class **$WhenMappings { ; } -keepclassmembers class kotlin.Metadata { public ; } -assumenosideeffects class kotlin.jvm.internal.Intrinsics { static void checkParameterIsNotNull(java.lang.Object, java.lang.String); } # gradle build error log -dontwarn java.lang.management.ManagementFactory** -dontwarn java.lang.management.RuntimeMXBean** -dontwarn org.slf4j.impl.StaticLoggerBinder** -dontwarn org.slf4j.impl.StaticMDCBinder** # ; long nativeHandle; private static *** onMMKVCRCCheckFail(***); private static *** onMMKVFileLengthError(***); private static *** mmkvLogImp(...); private static *** onContentChangedByOuterProcess(***); } # -mmkv> # # ; } # Same story for the standard library's SafeContinuation that also uses AtomicReferenceFieldUpdater -keepclassmembers class kotlin.coroutines.SafeContinuation { volatile ; } # Only used in `kotlinx.coroutines.internal.ExceptionsConstructor`. # The case when it is not available is hidden in a `try`-`catch`, as well as a check for Android. -dontwarn java.lang.ClassValue # -kotlinx.coroutines>