# Keep Gravity SDK public API
-keep class ai.trygravity.sdk.Gravity { *; }
-keep class ai.trygravity.sdk.models.** { *; }
-keep class ai.trygravity.sdk.HashedIdentity { *; }

# The device ad-tracking opt-out (ConsentSignal.advertisingOptOut) resolves
# AdvertisingIdClient reflectively so the SDK adds no play-services
# dependency. Reflective-only references are invisible to R8, so the class
# and its Info accessors must be kept unconditionally: an -if guard would
# never match, because with no bytecode reference the class is dead code
# before the condition is evaluated. For apps that don't ship
# play-services-ads-identifier the keep is a no-op and -dontwarn suppresses
# the missing-class warning.
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient {
    *** getAdvertisingIdInfo(android.content.Context);
}
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info {
    boolean isLimitAdTrackingEnabled();
    java.lang.String getId();
}
-dontwarn com.google.android.gms.ads.identifier.**
