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
|
compileSdk = flutter.compileSdkVersion
|
||||||
ndkVersion = flutter.ndkVersion
|
ndkVersion = flutter.ndkVersion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
compileOptions {
|
compileOptions {
|
||||||
isCoreLibraryDesugaringEnabled = true
|
isCoreLibraryDesugaringEnabled = true
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_17
|
||||||
@@ -40,10 +42,30 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
release {
|
getByName("release") {
|
||||||
// TODO: Add your own signing config for the release build.
|
// TODO: Add your own signing config for the release build.
|
||||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||||
signingConfig = signingConfigs.getByName("debug")
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
Whitespace-only changes.
Reference in new issue
Block a user