Proguard and R8
The usage of Proguard is no longer required for the Mediation SDK and its adapters. However, partner network SDKs may still require Proguard or R8. Refer to their respective SDK documentation as to whether you need to amend Proguard rules to your application. Chartboost will no longer provide additional documentation on using Proguard.
For Mediation 5.X 🔗
Add the following keep
rules to your Proguard’s proguard-rules.pro
or R8 file.
All consent handling and Chartboost module initialization will be done by the Core SDK.
// Chartboost Mediation SDK
-keep class com.chartboost.chartboostmediationsdk.** { *; }
// Chartboost Core SDK
-keep class com.chartboost.core.** { *; }
// Chartboost Mediation Adapters
-keep class com.chartboost.mediation.** { *; }
// Keep kotlinx.serialization annotations
-keepattributes *Annotation*
// Keep the names of kotlinx.serialization classes
-keep,includedescriptorclasses class kotlinx.serialization.** {
*;
}
// Keep the names of classes with @Serializable annotation
-keep,includedescriptorclasses @kotlinx.serialization.Serializable class * {
*;
}
// Keep kotlinx.serialization internal implementation classes
-keepclassmembers class kotlinx.serialization.internal.** {
*;
}
For Mediation SDK 3.1.0+ and 4.X 🔗
Add the following keep
classes to your Proguard’s proguard-rules.pro
or R8 file.
// Chartboost Mediation SDK
-keep class com.chartboost.heliumsdk.** { *; }
// Chartboost Mediation Adapters
-keep class com.chartboost.mediation.** { *; }
// Keep kotlinx.serialization annotations
-keepattributes *Annotation*
// Keep the names of kotlinx.serialization classes
-keep,includedescriptorclasses class kotlinx.serialization.** {
*;
}
// Keep the names of classes with @Serializable annotation
-keep,includedescriptorclasses @kotlinx.serialization.Serializable class * {
*;
}
// Keep kotlinx.serialization internal implementation classes
-keepclassmembers class kotlinx.serialization.internal.** {
*;
}
Prior to Mediation SDK 3.1.0 🔗
Add the following to your Proguard’s proguard-rules.pro
or R8 file.
-keep class com.chartboost.** { *; }