# -----------------------------------------------------------------------
# Novvy Ads SDK - Consumer ProGuard Rules
# These rules are automatically applied to apps that integrate this SDK.
# -----------------------------------------------------------------------

# --- Public API ---
-keep public class ai.novvy.android.sdk.NovvySDK { *; }
-keep public class ai.novvy.android.sdk.NovvyInterstitialAd { *; }
-keep public class ai.novvy.android.sdk.NovvyRewardedAd { *; }
-keep public class ai.novvy.android.sdk.NovvyReward { *; }
-keep public class ai.novvy.android.sdk.NovvyError { *; }
-keep public class ai.novvy.android.sdk.NovvyPrivacyContext { *; }
-keep public class ai.novvy.android.sdk.NovvyContentContext { *; }
-keep public interface ai.novvy.android.sdk.NovvyInterstitialAdListener { *; }
-keep public interface ai.novvy.android.sdk.NovvyRewardedAdListener { *; }
-keep public class ai.novvy.android.sdk.NovvyBannerAd { *; }
-keep public interface ai.novvy.android.sdk.NovvyBannerAdListener { *; }
-keep public interface ai.novvy.android.sdk.NovvyPlayerAdapter { *; }
-keep public class ai.novvy.android.sdk.NovvyFeedAd { *; }
-keep public interface ai.novvy.android.sdk.NovvyFeedAdListener { *; }

# --- Mediation Adapter ---
-keep public class ai.novvy.android.sdk.mediation.NovvyMediationAdapter { *; }

# --- JavaScript Bridge ---
# Prevents R8 from renaming @JavascriptInterface methods used by ad creatives
-keepclassmembers class ai.novvy.android.sdk.Internal.NovvyWebViewActivity$NovvyJSBridge {
    @android.webkit.JavascriptInterface <methods>;
}

# --- Kotlinx Serialization ---
# Required for bid request/response JSON parsing to work correctly
-keepattributes *Annotation*, InnerClasses
-dontnote kotlinx.serialization.**
-keepclassmembers @kotlinx.serialization.Serializable class ai.novvy.android.sdk.** { *; }
-keep class ai.novvy.android.sdk.Internal.Models** { *; }
