Browse Source

优化包大小

ios
王子贤 4 months ago
parent
commit
fbd57ad2d1
3 changed files with 19 additions and 6 deletions
  1. 8
      android/app/build.gradle.kts
  2. 7
      android/app/proguard-rules.pro
  3. 10
      android/gradle.properties

8
android/app/build.gradle.kts

@ -34,7 +34,13 @@ android {
release {
// 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")
signingConfig = signingConfigs.release
ndk {
abiFilters 'arm64-v8a'
}
shrinkResources true
minifyEnabled true
proguardFiles "proguard-rules.pro"
}
}

7
android/app/proguard-rules.pro

@ -0,0 +1,7 @@
#Flutter Wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }

10
android/gradle.properties

@ -2,8 +2,8 @@ org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m
android.useAndroidX=true
android.enableJetifier=true
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=10810
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=10810
#
#systemProp.http.proxyHost=127.0.0.1
#systemProp.http.proxyPort=10810
#systemProp.https.proxyHost=127.0.0.1
#systemProp.https.proxyPort=10810
Loading…
Cancel
Save