Skip to content

Commit 3a941ec

Browse files
thomson-tjamesnrokt
andcommitted
fix: Restore ProGuard rules to preserve Rokt class members
`events` API from Rokt class was getting removed by proguard. Keep the class members and annotations for kotlin metadata Co-authored-by: James Newman <james.newman@rokt.com> Signed-off-by: Thomson Thomas <125323226+thomson-t@users.noreply.github.com>
1 parent 7ea68cc commit 3a941ec

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

android-core/proguard.pro

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,11 +208,21 @@
208208
-keep class com.mparticle.rokt.RoktLayoutDimensionCallBack { *; }
209209
-keep class com.mparticle.rokt.RoktOptions { *; }
210210

211+
# Preserve annotation classes
212+
-keep class androidx.annotation.NonNull { *; }
213+
-keep class androidx.annotation.Nullable { *; }
214+
-keepclassmembers class com.mparticle.** {
215+
@androidx.annotation.NonNull *;
216+
@androidx.annotation.Nullable *;
217+
}
218+
211219
# Preserve all method signatures in the Rokt class to prevent overload resolution issues
212220
-keepclassmembers class com.mparticle.Rokt {
213-
public void selectPlacements(...);
214-
public void purchaseFinalized(...);
221+
*;
215222
}
223+
-keepclassmembers class com.mparticle.KitIntegration$RoktListener* {
224+
*;
225+
}
216226
-keep public class com.mparticle.audience.* {
217227
*;
218228
}

0 commit comments

Comments
 (0)