fix: add proguard rules, avoid protobuf generated classes got obfuscated

This commit is contained in:
mcfans 2023-11-06 01:04:53 +08:00
parent 6d8272472a
commit e474b595ad
2 changed files with 5 additions and 0 deletions

View File

@ -93,6 +93,7 @@ android {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules'
}
}
}

View File

@ -0,0 +1,4 @@
# Keep class members from protobuf generated code.
-keepclassmembers class * extends com.google.protobuf.GeneratedMessageLite {
<fields>;
}