image: androidsdk/android-30 before_script: # Ask gradle to put everything to .gradle dir so that we can cache it - export GRADLE_USER_HOME=`pwd`/.gradle cache: key: "mealie-android" paths: - .gradle stages: - check - build assembleDebug: interruptible: true stage: build needs: [ ] script: - ./gradlew assembleDebug artifacts: paths: - app/build/outputs/apk/debug/*.apk checkApp: interruptible: true stage: check needs: [ ] script: - ./gradlew check artifacts: when: always reports: junit: ./**/build/test-results/**/TEST-*.xml assembleRelease: interruptible: true stage: build needs: [ "check" ] script: - echo "$MEALIE_KEY_STORE" | base64 -d > app/mealie-release-key.jks - echo "keystorePath=mealie-release-key.jks" > keystore.properties - echo "keystorePassword=$MEALIE_KEY_STORE_PASSWORD" >> keystore.properties - echo "keyAlias=$MEALIE_KEY_ALIAS" >> keystore.properties - echo "keyPassword=$MEALIE_KEY_PASSWORD" >> keystore.properties - ./gradlew assembleRelease artifacts: paths: - app/build/outputs/apk/release/*.apk rules: - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'