-
Notifications
You must be signed in to change notification settings - Fork 283
/
Copy path.gitlab-ci.yml
29 lines (28 loc) · 1.11 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "29"
ANDROID_BUILD_TOOLS: "29.0.2"
ANDROID_SDK_URL: "https://dl.google.com/android/repository/commandlinetools-linux-6609375_latest.zip" # current available in https://developer.android.com/studio/index.html#downloads
before_script:
- apt-get --quiet update --yes
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
- wget --quiet --output-document=android-tools.zip ${ANDROID_SDK_URL}
- mkdir -p android-sdk-linux/cmdline-tools
- unzip ./android-tools.zip -d android-sdk-linux/cmdline-tools
- export ANDROID_HOME=$PWD/android-sdk-linux
- export ANDROID_SDKMANAGER=${ANDROID_HOME}/cmdline-tools/tools/bin/sdkmanager
- echo y | ${ANDROID_SDKMANAGER} "platforms;android-${ANDROID_COMPILE_SDK}" "platform-tools" "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
- export PATH=$PATH:${ANDROID_HOME}/platform-tools/
- chmod +x ./gradlew
- set +o pipefail
- yes | ${ANDROID_SDKMANAGER} --licenses
- set -o pipefail
stages:
- build
build:
stage: build
script:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/