From 9f4729a57f3ec35f834ea415a65571b930a6b13a Mon Sep 17 00:00:00 2001 From: Steve Hannah Date: Sat, 18 Nov 2023 09:11:39 -0800 Subject: [PATCH] fix: android builder firebase proguard keep rules Backporting rules that were already applied when newFirebaseMessaging was on, but they are needed in all cases. --- .../java/com/codename1/builders/AndroidGradleBuilder.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java b/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java index cd7693db48..849a1e3fd5 100644 --- a/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java +++ b/maven/codenameone-maven-plugin/src/main/java/com/codename1/builders/AndroidGradleBuilder.java @@ -3167,11 +3167,8 @@ public void usesClassMethod(String cls, String method) { String keepOverride = request.getArg("android.proguardKeepOverride", "Exceptions, InnerClasses, Signature, Deprecated, SourceFile, LineNumberTable, *Annotation*, EnclosingMethod"); - String keepFirebase = ""; - if (newFirebaseMessaging) { - keepFirebase = "-keep class com.google.android.gms.** { *; }\n\n" + - "-keep class com.google.firebase.** { *; }\n\n"; - } + String keepFirebase = "-keep class com.google.android.gms.** { *; }\n\n" + + "-keep class com.google.firebase.** { *; }\n\n"; // workaround broken optimizer in proguard String proguardConfigOverride = "-dontusemixedcaseclassnames\n" + "-dontskipnonpubliclibraryclasses\n"