### Metica START
-keep class com.metica.ads.* {public *;}
-keep class com.metica.ads.mediation.* {public *;}
-keep class com.metica.ads.util.* {public *;}
-keep class com.metica.unity_bridge.* {*;}
-keep class com.metica.* {public *;}

# Keep all classes that implement MeticaAd interface
-keep class * implements com.metica.ads.MeticaAd {
    # Keep all fields defined in the interface
    <fields>;
    # Keep all methods defined in the interface
    <methods>;
}

## KTor is using an interface for Logger. Added a consumer rule for Proguard not to fail for the consumer
## https://youtrack.jetbrains.com/issue/KTOR-5528/Missing-class-warning-when-using-R8-with-ktor-client-in-android-application
-dontwarn org.slf4j.impl.StaticLoggerBinder

## Unity doesn't include the Serialization plugin,
## so it will obfuscate these classes, without this rule.
-keep @kotlinx.serialization.Serializable class com.metica.** {*;}

## Keep packagenames as is
-keeppackagenames com.metica**

## Metica has a runtime only dependency on UnityPlayer, hence this rule
-dontwarn com.unity3d.player.UnityPlayer

# When Proguard obfuscates `com.google.android.gms.ads.AdSize` then this Applovin code doesn't work for adaptive banners.
# So a keep rule is added.
#    l3:class
#    public static AppLovinSdkUtils.Size b(int var0, MaxAdFormat var1, Context var2) {
#        Class var104;
#        Class var10000;
#        Method var10002;
#        try {
#            var10000 = Class.forName("com.google.android.gms.ads.AdSize");
#            var104 = var10000;
#            var10002 = var10000.getMethod("getCurrentOrientationAnchoredAdaptiveBannerAdSize", Context.class, Integer.TYPE);
#        } catch (Throwable var94) {
#            boolean var10001 = false;
#            return var1.getSize();
#        }
-keep class com.google.android.gms.ads.AdSize {*;}

### END
