Skip to content
Snippets Groups Projects
Commit 79374ca7 authored by Benoît Harrault's avatar Benoît Harrault
Browse files

Improve build process, according to "Build multiple APKs"...

Improve build process, according to "Build multiple APKs" https://developer.android.com/build/configure-apk-splits
parent ae63d53f
No related branches found
No related tags found
No related merge requests found
Pipeline #6111 failed
This commit is part of merge request !71. Comments created here will be created in the context of that merge request.
......@@ -25,6 +25,7 @@ android:build-debug:
# build flutter app
- flutter packages get
- flutter clean
- flutter build apk --debug --split-per-abi
- flutter build apk --debug
# prepare artifact
- find . -name "*.apk" # where is my apk?
......@@ -63,6 +64,7 @@ android:build-release:
else
flutter packages get
flutter clean
flutter build apk --release --split-per-abi
flutter build apk --release
fi
# prepare artifact
......
......@@ -62,6 +62,31 @@ android {
signingConfig signingConfigs.release
}
}
splits {
abi {
reset()
include('armeabi-v7a', 'x86', 'x86_64')
}
}
}
ext.abiCodes = [
'armeabi-v7a': 1,
'x86': 2,
'x86_64': 3
]
import com.android.build.OutputFile
android.applicationVariants.all { variant ->
variant.outputs.each { output ->
def baseAbiVersionCode = project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
if (baseAbiVersionCode != null) {
output.versionCodeOverride = baseAbiVersionCode * 1000 + variant.versionCode
}
}
}
flutter {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment