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>
This commit is contained in:
Aayush Gupta 2026-02-04 16:22:48 +08:00
parent 8d6e68d6f4
commit 85d43fe45e

View File

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