# Application classes that will be serialized/deserialized over Gson
-keep class io.portalhq.android.provider.data.** { *; }
-keep class io.portalhq.android.provider.signers.data.** { *; }
-keep class io.portalhq.android.mpc.data.** { *; }
-keep class io.portalhq.android.connect.data.** { *; }
-keep class io.portalhq.android.api.data.** { *; }
-keep class io.portalhq.android.storage.cloud.google.data.** { *; }
-keep class io.portalhq.android.utils.errors.** { *; }
-keep class io.portalhq.android.utils.http.data.** { *; }
-keep class io.portalhq.android.storage.cloud.passkey.data.** { *; }
-keep class io.portalhq.android.components.webview.data.** { *; }
-keep class io.portalhq.android.swaps.data.** { *; }
-keep class io.portalhq.android.utils.errors.** { *; }
-keep class io.portalhq.android.utils.events.** { *; }
-keep class io.portalhq.android.exceptions.** { *; }
-keep class io.portalhq.android.data.** { *; }

-keepclassmembers enum * { *; }

-if class androidx.credentials.CredentialManager
-keep class androidx.credentials.playservices.** {
  *;
}

-keepattributes Signature
# For using GSON @Expose annotation
-keepattributes *Annotation*
# Gson specific classes
-keep class com.google.gson.stream.** { *; }
# Prevent proguard from stripping interface information from TypeAdapterFactory, JsonSerializer, JsonDeserializer instances (so they can be used in reflective operations)
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

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

# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken

-ignorewarnings

# Remove logs
-assumenosideeffects class android.util.Log {
    public static *** *(...);
}