image: openjdk:11 variables: ANDROID_COMPILE_SDK: "30" ANDROID_BUILD_TOOLS: "30.0.3" ANDROID_SDK_TOOLS: "7583922_latest" GIT_SUBMODULE_STRATEGY: normal before_script: - apt-get --quiet update --yes - apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 - wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/commandlinetools-linux-${ANDROID_SDK_TOOLS}.zip - unzip -d android-sdk-linux android-sdk.zip - echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null - echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "platform-tools" >/dev/null - echo y | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null - export ANDROID_SDK_ROOT=$PWD - export PATH=$PATH:$PWD/platform-tools/ - chmod +x ./gradlew # temporarily disable checking for EPIPE error and use yes to accept all licenses - set +o pipefail - yes | android-sdk-linux/cmdline-tools/bin/sdkmanager --sdk_root=. --licenses - set -o pipefail stages: - build - test lintDebug: interruptible: true stage: build script: - ./gradlew -Pci --console=plain :app:lintGplayDebug -PbuildDir=lint assembleDebug: interruptible: true stage: build script: - ./gradlew assembleDebug artifacts: paths: - app/build/outputs/ debugTests: interruptible: true stage: test script: - ./gradlew -Pci --console=plain :app:testGplayDebug #androidTests: # image: ghcr.io/bitfireat/docker-android-ci:main # stage: test # tags: # # require the privileged tag if the emulator is needed # - privileged # script: # - start-emulator.sh # - ./gradlew app:connectedGplayDebugAndroidTest # artifacts: # paths: # - app/build/outputs/lint-results-debug.html # - app/build/reports # - build/reports