dep-protobuf/java/lite/proguard.pgcfg
Protobuf Team Bot 48a0e0936e Open-source the ProGuard assumeLiteRuntime=true rule.
Open-source Protobuf users should benefit from bypassing full runtime inheritance checks in the lite runtime on startup paths.

PiperOrigin-RevId: 948783493
2026-07-16 00:03:59 -07:00

21 lines
769 B
Text

# Keep the annotations that proguard needs to process.
-keep @com.google.protobuf.DoNotInline class *
# Allow the method to be shrunk if unused and obfuscated even it it is used.
-keepclassmembers,allowshrinking,allowobfuscation class * {
@com.google.protobuf.DoNotInline *;
}
# Skip runtime check for isOnAndroidDevice().
# One line to make it easy to remove with sed.
-assumevalues class com.google.protobuf.Android { static boolean ASSUME_ANDROID return true; }
# bypass full runtime inheritence checks in lite runtime. These are on the
# critical path for startup.
-assumevalues class com.google.protobuf.Android {
static boolean assumeLiteRuntime return true;
}
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
<fields>;
}