Skip to content

Commit 85d43fe

Browse files
committed
proguard: Keep fields of generated proguard files
Inspired from https://github.com/protocolbuffers/protobuf/blob/main/java/lite.md#r8-rule-to-make-production-app-builds-work Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
1 parent 8d6e68d commit 85d43fe

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

app/proguard-rules.pro

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,8 @@
3939

4040
## For some reason NotificationModeConfigFragment wasn't kept (only referenced in a preference xml)
4141
-keep class org.schabi.newpipe.settings.notifications.** { *; }
42+
43+
# Prevent R8 from stripping or renaming Protobuf internal fields
44+
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
45+
<fields>;
46+
}

0 commit comments

Comments
 (0)