# JNI: Keep all native methods and the GcCutils class used for architecture detection
-keepclasseswithmembernames class * {
    native <methods>;
}
-keep class jni.GcCutils { *; }

# Retrofit: Essential rules for Retrofit reflection-based service creation
-keepattributes Signature, InnerClasses, EnclosingMethod
-keepattributes RuntimeVisibleAnnotations, RuntimeVisibleParameterAnnotations
-keepattributes AnnotationDefault

-keepclassmembers,allowobfuscation interface * {
    @retrofit2.http.* <methods>;
}

# Keep the GepettoUtilsService interface
-keep interface club.gepetto.composeutils.image.network.GepettoUtilsService { *; }

# Kotlinx Serialization: Preserve @Serializable classes and their serializers
-keepattributes RuntimeVisibleAnnotations, InnerClasses
-keepclassmembers class club.gepetto.composeutils.models.GcNotes {
    *** Companion;
}
# Serializer is generated at build time
-keep class club.gepetto.composeutils.models.GcNotes$Serializer
-keep class club.gepetto.composeutils.models.GcNotes { *; }

# Suppress warnings from dependencies that may occur during the app's minification
-dontwarn java.lang.invoke.StringConcatFactory
-dontwarn org.bouncycastle.jsse.provider.BouncyCastleJsseProvider
-dontwarn org.bouncycastle.jsse.BCSSLSocket
-dontwarn org.bouncycastle.jsse.BCSSLParameters
-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

# Accompanist Pager
-dontwarn com.google.accompanist.pager.PagerStateKt
-dontwarn com.google.accompanist.pager.PagerState
-dontwarn com.google.accompanist.pager.PagerScope
-dontwarn com.google.accompanist.pager.Pager

# Coil
-dontwarn coil.request.ImageRequest
-dontwarn coil.request.ImageRequest$Listener
-dontwarn coil.request.ImageRequest$Builder
-dontwarn coil.request.CachePolicy
-dontwarn coil.compose.SingletonAsyncImageKt

# GcLog
-dontwarn club.gepetto.utils.GcLog**

# ZXing
-dontwarn com.google.zxing.**
