# Keep the AIDL interface
-keep class com.android.vending.billing.** { *; }
-keep class com.google.android.apps.play.billingtestcompanion.aidl.** { *; }

-dontwarn javax.annotation.**
-dontwarn org.checkerframework.**
-dontwarn com.google.android.apps.common.proguard.UsedByReflection

-keepnames class com.android.billingclient.api.ProxyBillingActivity
-keepnames class com.android.billingclient.api.ProxyBillingActivityV2

# Avoids Proguard warning at build time due to Protobuf use of sun.misc.Unsafe
# and libcore.io.Memory which are available at runtime.
-dontwarn libcore.io.Memory
-dontwarn sun.misc.Unsafe


# For Phenotype
# An unused P/H transitive dependency: com.google.android.libraries.phenotype.registration.PhenotypeResourceReader is stripped out from all Granular normal deps and "can't find reference..." DepsVersionCompat test warning
# is suppressed by ProGuard -dontwarn config.
-dontwarn com.google.android.libraries.phenotype.registration.PhenotypeResourceReader
-dontwarn com.google.android.apps.common.proguard.SideEffectFree

# Uses reflection to determine if these classes are present and has a graceful
# fallback if they aren't. The test failure it fixes appears to be caused by flogger.
-dontwarn dalvik.system.VMStack
-dontwarn com.google.common.flogger.backend.google.GooglePlatform
-dontwarn com.google.common.flogger.backend.system.DefaultPlatform
# We keep all fields for every generated proto file as the runtime uses
# reflection over them that ProGuard cannot detect. Without this keep
# rule, fields may be removed that would cause runtime failures.
-keepclassmembers class * extends com.google.android.gms.internal.play_billing.zzhk {
  <fields>;
}
