# R8/ProGuard rules shipped to every app that consumes @layers/react-native.
#
# LayersAdvertisingIdModule and LayersInstallReferrerModule reach these APIs
# REFLECTIVELY so that a consumer who excludes the optional dependencies
# degrades to null instead of failing to build:
#
#   Class.forName("com.google.android.gms.ads.identifier.AdvertisingIdClient")
#
# That gives R8 no static reference to the targets, so nothing guarantees they
# survive shrinking in a release build — and play-services-ads-identifier's AAR
# ships no consumer rules of its own. If they are stripped, Class.forName
# throws, the modules swallow ClassNotFoundException and return null, and the
# advertising ID and install referrer are silently dead in RELEASE ONLY —
# invisible in debug, where shrinking is off.
#
# -dontwarn accompanies each keep so a consumer who deliberately excludes the
# dependency still builds cleanly; the reflective lookup then fails as designed.

-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient { *; }
-keep class com.google.android.gms.ads.identifier.AdvertisingIdClient$Info { *; }
-dontwarn com.google.android.gms.ads.identifier.**

-keep class com.android.installreferrer.api.** { *; }
-dontwarn com.android.installreferrer.**
