2022-07-11 04:00:35 +00:00
|
|
|
image: ubuntu:jammy
|
|
|
|
|
2022-07-11 04:16:50 +00:00
|
|
|
# https://about.gitlab.com/blog/2018/10/24/setting-up-gitlab-ci-for-android-projects/
|
|
|
|
variables:
|
|
|
|
ANDROID_COMPILE_SDK: "28"
|
|
|
|
ANDROID_BUILD_TOOLS: "28.0.2"
|
|
|
|
ANDROID_SDK_TOOLS: "4333796"
|
|
|
|
|
|
|
|
before_script:
|
2022-07-11 04:28:29 +00:00
|
|
|
- apt-get update -y --quiet
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y --quiet wget tar unzip lib32stdc++6 lib32z1 openjdk-8-jre
|
|
|
|
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
|
|
|
|
- unzip -q -d android-sdk-linux android-sdk.zip
|
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
|
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" > /dev/null
|
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
|
2022-07-11 04:16:50 +00:00
|
|
|
- export ANDROID_HOME=$PWD/android-sdk-linux
|
|
|
|
- export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
|
|
|
|
# temporarily disable checking for EPIPE error and use yes to accept all licenses
|
|
|
|
- set +o pipefail
|
|
|
|
- yes | android-sdk-linux/tools/bin/sdkmanager --licenses
|
|
|
|
- set -o pipefail
|
|
|
|
|
|
|
|
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
|