# Conserver la classe principale et ses méthodes publiques
-keep public class net.wysistat.lib.** { public *; protected *; }

# Conserver toutes les interfaces publiques du SDK
-keep public interface net.wysistat.lib.** { *; }

# Conserver les annotations
-keepattributes *Annotation*
-keepattributes Signature
-keepattributes Exceptions

# ========== EXISTANT (Patch original) ==========

# OkHttp (pour éviter que l'app n'ait à configurer ces règles)
-dontwarn okhttp3.**
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn org.conscrypt.**
-dontwarn org.bouncycastle.**
-dontwarn org.openjsse.**

# ByteBuddy/JNA - Fix pour les conflits avec Coil et autres libs
-dontwarn net.bytebuddy.**
-dontwarn com.sun.jna.**
-dontwarn java.lang.instrument.**
-dontwarn edu.umd.cs.findbugs.annotations.**

# Ktor - Si utilisé par d'autres bibliothèques
-dontwarn io.ktor.**

# ========== NOUVEAU (Corrections identifiées par l'audit) ==========

# Google Crypto Tink (androidx.security:security-crypto)
-dontwarn com.google.crypto.tink.**
-dontwarn com.google.crypto.tink.shaded.protobuf.**
-keep class com.google.crypto.tink.** { *; }
-keep class com.google.crypto.tink.KeysetHandle { *; }
-keep class com.google.crypto.tink.aead.** { *; }
-keepclassmembers class * extends com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite {<fields>;}

# OkHttp Dépendances Optionnelles
-dontwarn okhttp3.internal.platform.ConscryptPlatform
-dontwarn okhttp3.internal.platform.Android10Platform
-dontwarn org.codehaus.mojo.animal_sniffer.**
-keepnames class okhttp3.internal.publicsuffix.PublicSuffixDatabase

# Retrofit avec R8 Full Mode
-keep,allowobfuscation,allowshrinking interface retrofit2.Call
-keep,allowobfuscation,allowshrinking class retrofit2.Response
-keep,allowobfuscation,allowshrinking class kotlin.coroutines.Continuation

# Kotlin Coroutines
-dontwarn kotlin.reflect.jvm.internal.**
-dontwarn kotlinx.coroutines.debug.**

# Annotations et Outils
-dontwarn edu.umd.cs.findbugs.**
-dontwarn com.google.errorprone.**
-dontwarn org.checkerframework.**

# Java Management (pour les performances)
-dontwarn java.lang.management.**

# SLF4J (si présent via des dépendances)
-dontwarn org.slf4j.**