android, add release build rules which slightly help to reduce filesizes.
This commit is contained in:
1 parent
7ab13dd4de
commit
03f9e2fa56
2 files changed
+23
-1
No files matched your search
@@ -15,6 +15,8 @@ android {
|
||||
compileSdk = flutter.compileSdkVersion
|
||||
ndkVersion = flutter.ndkVersion
|
||||
|
||||
|
||||
|
||||
compileOptions {
|
||||
isCoreLibraryDesugaringEnabled = true
|
||||
targetCompatibility = JavaVersion.VERSION_17
|
||||
@@ -40,10 +42,30 @@ android {
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
getByName("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")
|
||||
|
||||
/// 20260928 - Without minifying.
|
||||
/// Built build/app/outputs/flutter-apk/app-release.apk (54.3MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (17.2MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (19.8MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-x86_64-release.apk (21.2MB)
|
||||
|
||||
isMinifyEnabled = true
|
||||
isShrinkResources = true
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
|
||||
/// 20260928 - With minifying, helped some, but also used
|
||||
/// in combination with `--obfuscate --split-debug-info=./debug-info/`
|
||||
/// Built build/app/outputs/flutter-apk/app-release.apk (54.3MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (16.1MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (18.8MB)
|
||||
/// Built build/app/outputs/flutter-apk/app-x86_64-release.apk (20.3MB)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user