# BugWatch SDK — consumer ProGuard / R8 rules.
#
# Applied automatically to any app that depends on this AAR; consumers
# don't need to copy these into their own proguard-rules.pro.

# ── Public API surface ─────────────────────────────────────────────
# Keep every public type so reflective access (listener interface
# dispatch, kotlinx.serialization codecs) and Kotlin reflection see
# them intact.
-keep public class cloud.newinstance.bugwatch.** { public *; }
-keep public interface cloud.newinstance.bugwatch.** { *; }

# ── Kotlinx Serialization (used for event JSON encoding) ───────────
# Serializers are generated as nested classes; both must be kept.
-keepclassmembers,allowobfuscation class * {
    @kotlinx.serialization.Serializable <methods>;
}
-keepattributes InnerClasses
-keepattributes Signature
-if @kotlinx.serialization.Serializable class **
-keepclassmembers class <1> {
    static <1>$Companion Companion;
}
-if @kotlinx.serialization.Serializable class ** {
    static **$* *;
}
-keepclassmembers class <2>$<3> {
    kotlinx.serialization.KSerializer serializer(...);
}
