|
|
|
|
@ -3,35 +3,26 @@ image: openjdk:8-jdk |
|
|
|
|
variables: |
|
|
|
|
ANDROID_COMPILE_SDK: "28" |
|
|
|
|
ANDROID_BUILD_TOOLS: "28.0.3" |
|
|
|
|
ANDROID_SDK_TOOLS: "4333796" |
|
|
|
|
EMULATOR_VERSION: "22" # Unable to install with newer emulator versions. Don`t know why. |
|
|
|
|
|
|
|
|
|
SDK_TOOLS: "4333796" # from https://developer.android.com/studio/#command-tools |
|
|
|
|
EMULATOR_VERSION: "24" |
|
|
|
|
|
|
|
|
|
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/sdk-tools-linux-${ANDROID_SDK_TOOLS}.zip |
|
|
|
|
- unzip -d android-sdk-linux android-sdk.zip |
|
|
|
|
- wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-${SDK_TOOLS}.zip |
|
|
|
|
- unzip -q android-sdk.zip -d android-sdk-linux |
|
|
|
|
|
|
|
|
|
- mkdir android-sdk-linux/licenses |
|
|
|
|
- printf "8933bad161af4178b1185d1a37fbf41ea5269c55\nd56f5187479451eabf01fb78af6dfcb131a6481e" > android-sdk-linux/licenses/android-sdk-license |
|
|
|
|
- printf "84831b9409646a918e30573bab4c9c91346d8abd" > android-sdk-linux/licenses/android-sdk-preview-license |
|
|
|
|
- android-sdk-linux/tools/bin/sdkmanager --update > update.log |
|
|
|
|
- android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" "build-tools;${ANDROID_BUILD_TOOLS}" "extras;google;m2repository" "extras;android;m2repository" > installPlatform.log |
|
|
|
|
|
|
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null |
|
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "platform-tools" >/dev/null |
|
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null |
|
|
|
|
- export ANDROID_HOME=$PWD/android-sdk-linux |
|
|
|
|
- export PATH=$PATH:$PWD/android-sdk-linux/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/tools/bin/sdkmanager --licenses |
|
|
|
|
- set -o pipefail |
|
|
|
|
|
|
|
|
|
stages: |
|
|
|
|
- build |
|
|
|
|
- test |
|
|
|
|
|
|
|
|
|
lintDebug: |
|
|
|
|
stage: build |
|
|
|
|
script: |
|
|
|
|
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint |
|
|
|
|
|
|
|
|
|
instrumentedTests: |
|
|
|
|
stage: test |
|
|
|
|
script: |
|
|
|
|
@ -43,4 +34,4 @@ instrumentedTests: |
|
|
|
|
- android-sdk-linux/emulator/emulator -avd test -no-window -no-audio & |
|
|
|
|
- ./android-wait-for-emulator |
|
|
|
|
- adb shell input keyevent 82 |
|
|
|
|
- ./gradlew connectedCheck |
|
|
|
|
- ./gradlew connectedCheck |
|
|
|
|
|