# 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
-keeppackagenames

#Retrofit
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes SourceFile,LineNumberTable
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations

# Retain service method parameters when optimizing.
-keepclassmembers,allowshrinking,allowobfuscation interface * {
    @retrofit2.http.* <methods>;
}

# 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.* <methods>; }
-keep,allowobfuscation interface <1>

-dontwarn okhttp3.**
-dontwarn okio.**

#-keepattributes LocalVariableTable,LocalVariableTypeTable

#-keep class kotlin.** { *; }
#-keep class kotlin.Metadata { *; }
#-keep public class * extends android.app.Activity
#-keep class *$Companion { *; }
-keep class com.authme.lib.AuthMeKt { <methods>; }
-keep class com.authme.lib.AuthMeConfiguration { *; }
-keep class com.authme.lib.AuthMeConfiguration$Builder { *; }
-keep class com.authme.lib.AuthMeConfiguration$Companion { *; }
-keep class com.authme.lib.AuthMe$Companion { *; }
-keep class com.authme.lib.AuthMe { *; }
-keep class com.authme.lib.BuildConfig { *; }
-keep class com.authme.lib.extension.** { *; }
-keep class com.authme.lib.repository.PersonalInformationRequest { *; }
-keep class com.authme.lib.model.** { *; }
#-keep class com.authme.lib.model.domain.** { *; }
#-keep class com.authme.lib.model.repository.** { *; }
-keep class com.authme.lib.common.** { *; }
-keep interface com.authme.lib.common.** { *; }

#-keep class com.authme.** { *; }
#-keep class com.authme.lib.ocr.template.** { *; }
#-keep class com.authme.lib.ocr.repository.** { *; }
-keep class com.authme.lib.network.** { *; }
-keep class com.authme.lib.repository.** { *; }
#-keep class com.authme.lib.liveness.repository.** { *; }
-keep class com.authme.lib.utils.** { *; }
-keep class com.authme.model.** { *; }
-keep class com.authme.engine.** { *; }
-keep class com.authme.common.** { *; }
-keep class com.authme.lib.DefaultConfigKt { *; }
-keep class com.authme.lib.ImageInfoExtKt { *; }
-keep class engine.ImageUtils { *; }
#-keep class com.mv.engine.** { *; }

-dontwarn org.slf4j.impl.StaticLoggerBinder

# https://stackoverflow.com/questions/76532972/java-lang-classcastexception-java-lang-class-cannot-be-cast-to-java-lang-reflec
# 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
