# WireGuard TV ProGuard Rules

# Keep WireGuard classes
-keep class com.wireguard.** { *; }
-keep class com.wireguard.android.** { *; }

# Keep Gson classes
-keepattributes Signature
-keepattributes *Annotation*
-keep class com.google.gson.** { *; }
-keep class * implements com.google.gson.TypeAdapterFactory
-keep class * implements com.google.gson.JsonSerializer
-keep class * implements com.google.gson.JsonDeserializer

# Keep our models for Gson
-keep class de.hackernet.wireguardtv.model.** { *; }

# Keep Leanback classes
-keep class androidx.leanback.** { *; }

# Keep Kotlin coroutines
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-keepclassmembernames class kotlinx.** {
    volatile <fields>;
}
