unshortify/.gitlab-ci.yml

34 lines
1.3 KiB
YAML
Raw Normal View History

2022-07-11 04:00:35 +00:00
image: ubuntu:jammy
2022-07-11 04:42:58 +00:00
# https://gitlab.com/gitlab-org/gitlab-foss/-/blob/9d5d5a163f7634ffd555bffa545008ae3991c298/lib/gitlab/ci/templates/Android.latest.gitlab-ci.yml
2022-07-11 04:16:50 +00:00
variables:
ANDROID_COMPILE_SDK: "28"
ANDROID_BUILD_TOOLS: "28.0.2"
2022-07-11 04:42:58 +00:00
ANDROID_SDK_TOOLS: "7583922"
2022-07-11 04:16:50 +00:00
before_script:
2022-07-11 04:45:22 +00:00
- apt-get update -y --quiet > /dev/null
- DEBIAN_FRONTEND=noninteractive apt-get install -y --quiet wget tar unzip lib32stdc++6 lib32z1 openjdk-11-jre > /dev/null
2022-07-11 04:42:58 +00:00
- export ANDROID_HOME=$PWD/android-home
- mkdir -p "$ANDROID_HOME"
- cd "$ANDROID_HOME"
- wget --quiet --output-document=cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip
- unzip -q -d cmdline-tools cmdline-tools.zip
- mv cmdline-tools/{cmdline-,}tools || true
- cd ..
- export PATH=$PATH:$ANDROID_HOME/cmdline-tools/tools/bin/
- yes | sdkmanager --licenses > /dev/null || true
- echo y | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
- echo y | sdkmanager "platform-tools" > /dev/null
- echo y | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
2022-07-11 04:16:50 +00:00
stages:
- build
2022-07-11 03:41:46 +00:00
assembleDebug:
stage: build
2022-07-11 04:16:50 +00:00
script: ./gradlew assembleDebug
2022-07-11 03:41:46 +00:00
artifacts:
paths:
- app/build/outputs/apk/debug/*.apk