压缩安装包体积

This commit is contained in:
DelLevin-Home
2026-07-04 12:44:52 +08:00
parent f171b431d3
commit d7d2d236c3
10 changed files with 112 additions and 80 deletions

View File

@@ -32,6 +32,13 @@ android {
buildTypes {
release {
// 启用代码压缩和资源缩减
isMinifyEnabled = true
isShrinkResources = true
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig = signingConfigs.getByName("debug")