Using different Docker image

This commit is contained in:
Kumi 2024-01-08 12:17:12 +01:00
parent 353fa03adf
commit 71e9e228d3

View file

@ -8,18 +8,17 @@ variables:
before_script: before_script:
- apt update - apt update
- apt install -y wget tar unzip bash - apt install -y wget tar unzip bash
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip - mkdir -p android-sdk-linux/cmdline-tools/latest
- unzip -d android-sdk-linux android-sdk.zip - 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/cmdline-tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null - unzip -d android-sdk-linux/cmdline-tools/latest cmdline-tools.zip
- echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager "platform-tools" >/dev/null - mv android-sdk-linux/cmdline-tools/latest/cmdline-tools/* android-sdk-linux/cmdline-tools/latest
- echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null
- export ANDROID_HOME=$PWD/android-sdk-linux - export ANDROID_HOME=$PWD/android-sdk-linux
- export PATH=$PATH:$PWD/android-sdk-linux/platform-tools/ - export PATH=$PATH:$PWD/android-sdk-linux/cmdline-tools/latest/bin
- echo y | sdkmanager --licenses
- echo y | sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}"
- echo y | sdkmanager "platform-tools"
- echo y | sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}"
- chmod +x ./gradlew - chmod +x ./gradlew
# 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: stages:
- build - build