image: openjdk:8-jdk
variables:
ANDROID_COMPILE_SDK: "29"
ANDROID_BUILD_TOOLS: "29.0.2"
ANDROID_SDK_TOOLS: "29.0.2"
before_script:
- apt -q update
- apt -q install -y wget tar unzip lib32stdc++6 lib32z1
- wget -q -O android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip
- unzip -q android-sdk.zip
- echo y | tools/bin/sdkmanager "tools"
- echo y | tools/bin/sdkmanager "build-tools;29.0.2"
- echo y | tools/bin/sdkmanager "platform-tools" "platforms;android-29"
- echo y | tools/bin/sdkmanager "extras;google;m2repository"
- echo y | tools/bin/sdkmanager "extras;android;m2repository"
- export ANDROID_HOME=$PWD/
- export PATH=$PATH:$PWD/
- chmod +x ./gradlew
stages:
- test
- build
unitTests:
stage: test
script:
- ./gradlew test
build:
stage: build
only:
- master
script:
- ./gradlew assembleDebug
artifacts:
paths:
- app/build/outputs/
沒有留言:
張貼留言