From 46dc0c1be2bb30dacabf7ca5f3a01ef2267fb3ac Mon Sep 17 00:00:00 2001 From: Yuri Schimke Date: Sun, 8 Dec 2024 22:38:13 +0000 Subject: [PATCH] Fix: Keep proto generated message classes (#1506) Keep proto generated message classes and fields in proguard rules for both wearApp and androidApp. This prevents these classes from being obfuscated and ensures proper functionality. --- androidApp/proguard-rules.pro | 2 ++ wearApp/proguard-rules.pro | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/androidApp/proguard-rules.pro b/androidApp/proguard-rules.pro index 0962251ba..da3cccee6 100644 --- a/androidApp/proguard-rules.pro +++ b/androidApp/proguard-rules.pro @@ -12,6 +12,8 @@ -keep class dev.johnoreilly.confetti.wear.proto.** { *; } -keep class androidx.car.app.** { *; } +-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite { ; } + -keep class com.google.firebase.** { *; } -dontwarn okhttp3.internal.Util diff --git a/wearApp/proguard-rules.pro b/wearApp/proguard-rules.pro index 139f204ff..f3a834721 100644 --- a/wearApp/proguard-rules.pro +++ b/wearApp/proguard-rules.pro @@ -6,4 +6,7 @@ -dontwarn kotlinx.serialization.Serializable -keep class com.squareup.wire.** { *; } --keep class dev.johnoreilly.confetti.wear.proto.** { *; } + +-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite { ; } + +-keep class com.google.firebase.** { *; }