diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 97ddd37e32..0e847ba7c8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,13 +9,28 @@ variables: KEYSTORE_PASSWORD: "android" KEY_ALIAS: "androiddebugkey" KEY_PASSWORD: "android" + ANDROID_BUILD_TOOLS: "33.0.2" + ANDROID_COMPILE_SDK: "33" + ANDROID_SDK_TOOLS: "9477386" before_script: + - export ANDROID_HOME="${PWD}/android-sdk-root" + - install -d $ANDROID_HOME - export GRADLE_OPTS="-Dorg.gradle.daemon=false" - apt-get update -qy - apt-get install -y openjdk-17-jdk - export JAVA_HOME="/usr/lib/jvm/java-17-openjdk-amd64" - chmod +x gradlew + - wget --no-verbose --output-document=$ANDROID_HOME/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}_latest.zip + - unzip -q -d "$ANDROID_HOME/cmdline-tools" "$ANDROID_HOME/cmdline-tools.zip" + - mv -T "$ANDROID_HOME/cmdline-tools/cmdline-tools" "$ANDROID_HOME/cmdline-tools/tools" + - export PATH=$PATH:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/cmdline-tools/tools/bin + # use yes to accept all licenses + - yes | sdkmanager --licenses > /dev/null || true + - sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" + - sdkmanager "platform-tools" + - sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" + build: stage: build