Skip to content
Snippets Groups Projects

Resolve "Init application"

+ 35
5
@@ -2,7 +2,8 @@ image: cirrusci/flutter:latest
stages:
- update
- build
- build-debug
- build-release
- deploy
update:
@@ -12,8 +13,35 @@ update:
- flutter packages upgrade
interruptible: true
android:build:
stage: build
android:build-debug:
stage: build-debug
script:
# Flutter local configuration
- echo flutter.sdk=$FLUTTER_PATH > android/local.properties
- echo sdk.dir=$ANDROID_SDK_PATH >> android/local.properties
- echo flutter.buildMode=debug >> android/local.properties
# Android signing
- echo "$ANDROID_DEBUG_KEYSTORE_FILE" | base64 -d > android/app/my.keystore
- echo storeFile=my.keystore > android/key.properties
- echo storePassword=$ANDROID_DEBUG_KEYSTORE_PASSWORD >> android/key.properties
- echo keyAlias=$ANDROID_DEBUG_KEY_ALIAS >> android/key.properties
- echo keyPassword=$ANDROID_DEBUG_KEY_PASSWORD >> android/key.properties
# build flutter app
- flutter build apk --debug
# prepare artifact
- find . -name "*.apk" # where is my apk?
artifacts:
paths:
- build/app/outputs/apk/debug
expire_in: 1 week
interruptible: true
android:build-release:
stage: build-release
only:
- master
dependencies:
- android:build-debug
script:
# Flutter local configuration
- echo flutter.sdk=$FLUTTER_PATH > android/local.properties
@@ -27,9 +55,11 @@ android:build:
- echo keyPassword=$ANDROID_KEY_PASSWORD >> android/key.properties
# build flutter app
- flutter build apk
# prepare artifact
- find . -name "*.apk" # where is my apk?
artifacts:
paths:
- build/app/outputs/apk/release
- build/app/outputs/apk/release
expire_in: 1 week
interruptible: true
@@ -38,6 +68,6 @@ android:deploy:
only:
- master
dependencies:
- android:build
- android:build-release
script:
- wget ${REPOSITORY_UPDATE_WEBHOOK}?token=${REPOSITORY_TOKEN}
Loading