# Imported by library consumer

# Resolved by name at runtime from Unity's C#, so R8 sees no caller. docs/jni-boundary.md
-keep class com.adgem.android.PlayerMetadata$Builder { public <methods>; }
-keep interface com.adgem.android.OfferwallCallback { <methods>; }

# React Native passes a JS string to valueOf, so the constant names have to survive.
-keepclassmembers enum com.adgem.android.PlayerMetadata$Gender { *; }

# The extensible event surface. Nothing resolves it by string yet, so this is not holding a frozen
# name today — it is here because the first wrapper to adopt it will reach it through the same
# AndroidJavaProxy that makes OfferwallCallback's names a runtime contract, and by then a missing
# keep fails in the publisher's release build rather than in ours. The kind constants are named in
# a switch a publisher writes, which R8 does see, but the cost of keeping them is nil.
-keep interface com.adgem.android.OfferwallEventListener { <methods>; }
-keep class com.adgem.android.OfferwallEvent { public <methods>; }
-keepclassmembers enum com.adgem.android.OfferwallEvent$Kind { *; }
-keepclassmembers enum com.adgem.android.AdGemState { *; }

-keep class com.adgem.android.internal.** { *; }

# Using reflection to access AdvertisingIdClient and acuire Google Ad ID.
# TODO look to see if this is still required with updated GMS Ads
#noinspection ShrinkerUnresolvedReference
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient { *; }
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info { *; }

# Retrofit
-dontwarn javax.annotation.**

# We use androidx only at compile time. Consumer application should not care.
-dontwarn androidx.annotation.**

# OKIO
-dontwarn okio.**
-dontwarn okhttp3.**
-dontwarn org.codehaus.**
