mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
Open-source Protobuf users should benefit from bypassing full runtime inheritance checks in the lite runtime on startup paths. PiperOrigin-RevId: 948783493
21 lines
769 B
Text
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>;
|
|
}
|