-keep public class * extends android.app.Activity
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends androidx.lifecycle.ViewModel

-keep class com.horrortv.app.data.remote.omdb.dto.** { *; }
-keep class com.horrortv.app.domain.model.** { *; }

-keep class retrofit2.** { *; }
-keepclassmembernames class * {
    @retrofit2.http.* <methods>;
}

-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**
-dontwarn okio.**

-keep class com.google.gson.** { *; }
-keepclassmembers class * {
    @com.google.gson.annotations.SerializedName <fields>;
}

-keep class dagger.** { *; }
-keep class * extends dagger.** { *; }
-keep class * implements dagger.** { *; }
-keep class * extends javax.inject.** { *; }
-keep class * implements javax.inject.** { *; }
-dontwarn dagger.**

-keep class io.coil.** { *; }
-keep class coil.** { *; }

-keepclassmembers class kotlinx.coroutines.** {
    volatile <fields>;
}
-keepnames class kotlinx.coroutines.internal.MainDispatcherFactory {}
-keepnames class kotlinx.coroutines.CoroutineExceptionHandler {}
-keepclassmembernames class kotlinx.coroutines.** {
    @kotlinx.coroutines.InternalCoroutinesApi <methods>;
}

-assumenosideeffects class android.util.Log {
    public static boolean isLoggable(...);
    public static int v(...);
    public static int d(...);
    public static int i(...);
}

-optimizationpasses 5
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose

-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*,!code/allocation/variable

-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keepattributes RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations
-keepattributes RuntimeVisibleParameterAnnotations,RuntimeInvisibleParameterAnnotations
-keepattributes AnnotationDefault

-renamesourcefileattribute SourceFile
-keepattributes EnclosingMethod

-dontwarn javax.annotation.**
-dontwarn kotlin.Unit
-dontwarn retrofit2.Platform$Java8
-dontwarn kotlin.jvm.internal.Reflection

# Compose
-keep class androidx.compose.runtime.CompositionLocal { *; }
-keepclassmembers class * {
    @androidx.compose.runtime.Composable <methods>;
}

# Media3 ExoPlayer
-keep class androidx.media3.** { *; }

# Jsoup
-keep class org.jsoup.** { *; }

# Keep generic signature info for Retrofit+Gson
-keepattributes Signature

# Enums
-keepclassmembers enum * {
    public static **[] values();
    public static ** valueOf(java.lang.String);
}