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

Fix build process

parent e137c314
No related branches found
No related tags found
1 merge request!75Resolve "Fix build process"
Pipeline #6131 passed
......@@ -24,7 +24,9 @@ android:build-debug:
- echo keyPassword=$ANDROID_DEBUG_KEY_PASSWORD >> android/key.properties
# build flutter app
- VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f1)"
- echo "${VERSION_NAME}"
- VERSION_CODE="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f2)"
- echo "${VERSION_CODE}"
- flutter packages get
- flutter clean
- flutter build apk --debug --split-per-abi
......@@ -57,6 +59,9 @@ android:build-release:
- echo keyAlias=$ANDROID_KEY_ALIAS >> android/key.properties
- echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
# build flutter app
- BASE_APK_FOLDER="build/app/outputs/flutter-apk"
- echo "${BASE_APK_FOLDER}"
- mkdir -p "${BASE_APK_FOLDER}"
- VERSION_NAME="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f1)"
- VERSION_CODE="$(grep '^version:' pubspec.yaml | cut -d' ' -f2 | cut -d'+' -f2)"
- TAG_NAME="Release_${VERSION_NAME}_${VERSION_CODE}"
......@@ -71,7 +76,6 @@ android:build-release:
flutter build apk --release
fi
# prepare artifact
- BASE_APK_FOLDER="build/app/outputs/flutter-apk"
- for APK in ${BASE_APK_FOLDER}/*.apk; do mv -v "${APK}" "$(echo "${APK}" | sed "s|\.apk|_${VERSION_CODE}.apk|")"; done
- find "${BASE_APK_FOLDER}" -name "*.apk" # where are my apk?
artifacts:
......
......@@ -30,7 +30,6 @@ android {
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
archivesBaseName = "$applicationId" + "_" + "$versionCode"
}
signingConfigs {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment