# WhatAp Android Agent BOM - merged consumer ProGuard rules
# Auto-merged from all included modules at 2026년  6월 22일 월요일 10시 07분 17초 KST


# --- whatap-logger-debug ---
# WhatAp Android Logger — consumer ProGuard rules
# Shipped inside AAR. Applied automatically when consumer app enables R8 minification.
#
# Reason: WLoggerFactory.getLogger() uses computeIfAbsent(name, key -> new WLogger(...)),
#         which D8 desugars to WLoggerFactory$$ExternalSyntheticLambda0.
#         Without these rules, aggressive R8 may strip the synthetic class
#         → java.lang.NoClassDefFoundError at app startup (Builder.<init>).

# Keep all WhatAp logger classes and members (init paths use reflection-style discovery)
-keep class io.whatap.android.logger.** { *; }
-keepclassmembers class io.whatap.android.logger.** { *; }

# Keep all D8-generated synthetic lambda classes inside our package
-keep class io.whatap.android.logger.**$$ExternalSyntheticLambda* { *; }
-keep class io.whatap.android.agent.**$$ExternalSyntheticLambda* { *; }

# Silence warnings on optional/inner classes
-dontwarn io.whatap.android.logger.**

# --- agent-debug ---
# WhatAp Android Agent — consumer ProGuard rules
# Shipped inside AAR. Applied automatically when consumer app enables R8 minification.

# Keep all public API entry points (Builder, agent class, etc.)
-keep public class io.whatap.android.agent.WhatapAgent { *; }
-keep public class io.whatap.android.agent.WhatapAgent$Builder { *; }
-keepclassmembers class io.whatap.android.agent.WhatapAgent$* { *; }

# Keep all instrumentation public entry points
-keep public class io.whatap.android.agent.instrumentation.**Instrumentation { *; }
-keep public class io.whatap.android.agent.instrumentation.**Instrumentation$* { *; }
-keep public class io.whatap.android.agent.instrumentation.httpclient.InstrumentedDefaultHttpClient { *; }

# Keep D8-generated synthetic lambdas across whatap packages
-keep class io.whatap.android.**$$ExternalSyntheticLambda* { *; }

-dontwarn io.whatap.android.**
