Skip to content

Instantly share code, notes, and snippets.

@gabrimatic
Created April 16, 2021 12:11
Show Gist options
  • Save gabrimatic/010d76aaa1df0fda766200c6114ea601 to your computer and use it in GitHub Desktop.
Save gabrimatic/010d76aaa1df0fda766200c6114ea601 to your computer and use it in GitHub Desktop.
Customize app/build.gradle as bellow:
android {
...
flavorDimensions "api"
productFlavors {
minApi18 {
dimension "api"
minSdkVersion 18
versionCode 10000 + flutterVersionCode.toInteger()
versionName flutterVersionName
versionNameSuffix "-minApi18"
ndk {
abiFilters 'x86_64'
}
}
minApi19 {
dimension "api"
minSdkVersion 19
versionCode 20000 + flutterVersionCode.toInteger()
versionName flutterVersionName
versionNameSuffix "-minApi19"
ndk {
abiFilters 'armeabi-v7a'
}
}
minApi20 {
dimension "api"
minSdkVersion 20
versionCode 30000 + flutterVersionCode.toInteger()
versionName flutterVersionName
versionNameSuffix "-minApi20"
ndk {
abiFilters 'arm64-v8a'
}
}
}
}
Then release app by following command:
flutter build apk --release --obfuscate --split-debug-info=/app_name --flavor a_flavor_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment