Update template
This commit is contained in:
parent
53d3f0c474
commit
4ca61846e4
|
@ -1,25 +1,26 @@
|
||||||
image: ubuntu:jammy
|
image: ubuntu:jammy
|
||||||
|
|
||||||
# https://about.gitlab.com/blog/2018/10/24/setting-up-gitlab-ci-for-android-projects/
|
# https://gitlab.com/gitlab-org/gitlab-foss/-/blob/9d5d5a163f7634ffd555bffa545008ae3991c298/lib/gitlab/ci/templates/Android.latest.gitlab-ci.yml
|
||||||
variables:
|
variables:
|
||||||
ANDROID_COMPILE_SDK: "28"
|
ANDROID_COMPILE_SDK: "28"
|
||||||
ANDROID_BUILD_TOOLS: "28.0.2"
|
ANDROID_BUILD_TOOLS: "28.0.2"
|
||||||
ANDROID_SDK_TOOLS: "4333796"
|
ANDROID_SDK_TOOLS: "7583922"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- apt-get update -y --quiet
|
- apt-get update -y --quiet
|
||||||
- DEBIAN_FRONTEND=noninteractive apt-get install -y --quiet wget tar unzip lib32stdc++6 lib32z1 openjdk-8-jre
|
- DEBIAN_FRONTEND=noninteractive apt-get install -y --quiet wget tar unzip lib32stdc++6 lib32z1 openjdk-11-jre
|
||||||
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip
|
- export ANDROID_HOME=$PWD/android-home
|
||||||
- unzip -q -d android-sdk-linux android-sdk.zip
|
- mkdir -p "$ANDROID_HOME"
|
||||||
- echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
|
- cd "$ANDROID_HOME"
|
||||||
- echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" > /dev/null
|
- wget --quiet --output-document=cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip
|
||||||
- echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
|
- unzip -q -d cmdline-tools cmdline-tools.zip
|
||||||
- export ANDROID_HOME=$PWD/android-sdk-linux
|
- mv cmdline-tools/{cmdline-,}tools || true
|
||||||
- export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/
|
- cd ..
|
||||||
# temporarily disable checking for EPIPE error and use yes to accept all licenses
|
- export PATH=$PATH:$ANDROID_HOME/cmdline-tools/tools/bin/
|
||||||
- set +o pipefail
|
- yes | sdkmanager --licenses > /dev/null || true
|
||||||
- yes | android-sdk-linux/tools/bin/sdkmanager --licenses
|
- echo y | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" > /dev/null
|
||||||
- set -o pipefail
|
- echo y | sdkmanager "platform-tools" > /dev/null
|
||||||
|
- echo y | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" > /dev/null
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
|
|
Loading…
Reference in New Issue