# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class com.yoti.** implements com.google.gson.TypeAdapter
-keep class com.yoti.** implements com.google.gson.TypeAdapterFactory
-keep class com.yoti.** implements com.google.gson.JsonSerializer
-keep class com.yoti.** implements com.google.gson.JsonDeserializer

# Prevent R8 from leaving Data object members always null
-keepclassmembers,allowobfuscation class com.yoti.** {
  @com.google.gson.annotations.SerializedName <fields>;
}

# Keep enum classes that will be serialized/deserialized over Gson
-keepclassmembers enum com.yoti.** {
    !private <fields>;
}

# Do not remove methods with retrofit http annotations (e.g. abstract method overrides which just add the annotations)
-keep,allowobfuscation class com.yoti.** {
  @retrofit2.http.* <methods>;
}
-keep,allowobfuscation interface com.yoti.** {
  @retrofit2.http.* <methods>;
}
# 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

#Must match the rules at https://github.com/getyoti/yoti-doc-scan-android#proguard
-keepclassmembers class kotlinx.** {
    volatile <fields>;
}
-keep class com.microblink.** { *; }
-keep class com.microblink.**$* { *; }
-dontwarn com.microblink.**
-dontwarn com.facetec.sdk.**
-keep class com.facetec.sdk.** { *; }
-dontwarn javax.annotation.Nullable

# Needed for an issue in the mrtdDump lib (https://github.com/ktorio/ktor/issues/1354)
-keepclassmembers class io.ktor.** { volatile <fields>; }

# Keep all fragments for navigation framework
-keep class com.yoti.** extends androidx.fragment.app.Fragment {
    <init>();
}
# Keep names of all Parcelables - can be used as args for navigation framework
-keepnames class com.yoti.** implements android.os.Parcelable

# Keep dagger factory classes that are referenced by feature modules
-keep class com.yoti.** implements dagger.internal.Factory {
    public <methods>;
    public <fields>;
}

# Keep all core classes as they have to be accesible by any feature
-keep public class com.yoti.mobile.android.yotisdkcore.core.** { *; }

# Keep features configuration entity models and mapper classes
-keep public class com.yoti.mobile.android.yotisdkcore.feature.** { *; }
