-printseeds seeds.txt
-printusage unused.txt
-printconfiguration configuration.txt

-optimizations !code/simplification/arithmetic,!code/simplification/cast,!field/*,!class/merging/*
-optimizationpasses 5
-allowaccessmodification
-dontpreverify

-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses

-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService

# WorkManager ProGuard rules
-keep class * extends androidx.work.Worker
-keep class * extends androidx.work.ListenableWorker
-keepclassmembers class * extends androidx.work.Worker {
    <init>(android.content.Context,androidx.work.WorkerParameters);
}
-keepclassmembers class * extends androidx.work.ListenableWorker {
    <init>(android.content.Context,androidx.work.WorkerParameters);
}

-keepclasseswithmembernames class * {
    native <methods>;
}
-keepclassmembers public class * extends android.view.View {
   void set*(***);
   *** get*();
}
-keepclassmembers class * extends android.app.Activity {
   public void *(android.view.View);
}

-keep class com.userexperior.models.recording.UEWindowCallback

-keepclassmembers enum *  {
    <fields>;
    public static **[] values();
}

-keepclassmembers class * implements android.os.Parcelable {
  public static final android.os.Parcelable$Creator *;
}

-keepclassmembers class **.R$* {
    public static <fields>;
}

# WorkManager Upload Model Classes - Safety net for any remaining Gson usage
-keep class com.userexperior.networkmodels.upload.UploadRequest { *; }
-keep class com.userexperior.networkmodels.upload.UploadCrashOrAnrRequest { *; }
-keep class com.userexperior.networkmodels.upload.UploadFile { *; }
-keep class com.userexperior.networkmodels.upload.UploadAction { *; }
-keep enum com.userexperior.models.recording.enums.RecodingType { *; }

# Retrofit
-dontnote retrofit2.Platform
-dontnote retrofit2.Platform$IOS$MainThreadExecutor
-dontwarn retrofit2.Platform$Java8
-keepattributes Signature
-keepattributes Exceptions
-keepattributes *Annotation*

-keepattributes EnclosingMethod

-keepattributes InnerClasses

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

-assumenosideeffects class com.userexperior.utilities.Debug {
    public static void enableDebugging(...);
    public static void v(...);
    public static void d(...);
    public static void i(...);
    public static void w(...);
    public static void e(...);
}

-keep class com.userexperior.utilities.SecureViewBucket{
public static void *SecureViewBucket(...);
}

-keepclassmembers class * implements NetworkAPI {
    public <methods>;
}
-keepclassmembers class com.userexpeior.* {
    public static final <fields>;
}

-keep class com.userexperior.UserExperior{
public static void *(...);
}

-keep class com.userexperior.UserExperior { *; }

-keep class com.userexperior.interfaces.recording.UserExperiorListener { *; }

-keepclassmembers enum * { *; }

-keep class com.userexperior.models.recording.enums.UeCustomType { *; }

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

-keep class androidx.core.app.** { *; }

-keep class com.userexperior.networkmodels.tasklist.AppConfig { *; }

# added to fix ClassCastException in release build
-keep class com.userexperior.networkmodels.tasklist.AdvanceRules { *; } # imp
-keep class com.userexperior.networkmodels.tasklist.rule.BehaviourRules { *; } # imp

# event with prop issue fixed
-keep class com.userexperior.networkmodels.tasklist.rule.FilterProps { *; } # imp

# general rule issue solved
-keep class com.userexperior.networkmodels.tasklist.rule.GeneralRules { *; } # imp

# range issue solved with this
-keep class com.userexperior.networkmodels.tasklist.rule.FilterRange { *; } # imp

# bankopen webview issue in flutter app resolved
-keep class com.userexperior.external.displaycrawler.internal.model.view.** { *; } # imp

-keep class com.userexperior.networkmodels.tasklist.ThirdPartyClientDTO { *; }

-keep class com.userexperior.bridge.** { *; }

# Google's gson proguard rules below =======

# Gson uses generic type information stored in a class file when working with fields. Proguard
# removes such information by default, so configure it to keep all of it.
-keepattributes Signature

# For using GSON @Expose annotation
-keepattributes *Annotation*

# Gson specific classes
-dontwarn sun.misc.**

# Prevent proguard from stripping interface information from TypeAdapter, TypeAdapterFactory,
# JsonSerializer, JsonDeserializer instances (so they can be used in @JsonAdapter)
-keep class * extends com.google.gson.TypeAdapter
-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

# Google's gson proguard rules above ==================

# to preserve package name of userexperior to avoid build issues
-keeppackagenames

# 5Paisa issue fix
-keep class com.userexperior.networkmodels.tasklist.SdkTaskConditionDTO { *; }

# Keep Gson annotations
-keep class com.userexperior.external.gson.annotations.** { *; }

-dontwarn java.lang.invoke.StringConcatFactory

-keep class com.userexperior.networkmodels.eventcaptured.RevUserData { *; }

# Keep the entire LoggerManager class
-keep class com.userexperior.logging.LoggerManager { *; }

# Also keep related classes used by LoggerManager
-keep class com.userexperior.networkmodels.logging.** { *; }
-keep class com.userexperior.utilities.LoggingUtils { *; }
-keep class com.userexperior.networkmodels.logging.DataDogMessage { *; }
-keep class com.userexperior.networkmodels.logging.DataDogMessage$Builder { *; }

# Keep BuildConfig field that's referenced
-keepclassmembers class com.userexperior.BuildConfig {
    public static final boolean DEBUG;
    public static final java.lang.String LIBRARY_VERSION;
}

-keep class com.userexperior.logging.LoggerManager
-keep class com.userexperior.networkmodels.logging.LogLevel
-keep class com.userexperior.networkmodels.eventcaptured.RevUserData
