|
|
|
@ -4,12 +4,14 @@ variables: |
|
|
|
ANDROID_COMPILE_SDK: "28" |
|
|
|
ANDROID_COMPILE_SDK: "28" |
|
|
|
ANDROID_BUILD_TOOLS: "28.0.3" |
|
|
|
ANDROID_BUILD_TOOLS: "28.0.3" |
|
|
|
ANDROID_SDK_TOOLS: "4333796" |
|
|
|
ANDROID_SDK_TOOLS: "4333796" |
|
|
|
|
|
|
|
EMULATOR_VERSION: "22" # Unable to install with newer emulator versions. Don`t know why. |
|
|
|
|
|
|
|
|
|
|
|
before_script: |
|
|
|
before_script: |
|
|
|
- apt-get --quiet update --yes |
|
|
|
- apt-get --quiet update --yes |
|
|
|
- apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1 |
|
|
|
- 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 |
|
|
|
- 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 |
|
|
|
- unzip -d android-sdk-linux android-sdk.zip |
|
|
|
|
|
|
|
|
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "platforms;android-${ANDROID_COMPILE_SDK}" >/dev/null |
|
|
|
- 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 "platform-tools" >/dev/null |
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null |
|
|
|
- echo y | android-sdk-linux/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS}" >/dev/null |
|
|
|
@ -25,12 +27,12 @@ stages: |
|
|
|
- build |
|
|
|
- build |
|
|
|
- test |
|
|
|
- test |
|
|
|
|
|
|
|
|
|
|
|
lintDebug: |
|
|
|
#lintDebug: |
|
|
|
stage: build |
|
|
|
stage: build |
|
|
|
script: |
|
|
|
script: |
|
|
|
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint |
|
|
|
- ./gradlew -Pci --console=plain :app:lintDebug -PbuildDir=lint |
|
|
|
|
|
|
|
|
|
|
|
assembleDebug: |
|
|
|
#assembleDebug: |
|
|
|
stage: build |
|
|
|
stage: build |
|
|
|
script: |
|
|
|
script: |
|
|
|
- ./gradlew assembleDebug |
|
|
|
- ./gradlew assembleDebug |
|
|
|
@ -38,7 +40,20 @@ assembleDebug: |
|
|
|
paths: |
|
|
|
paths: |
|
|
|
- app/build/outputs/ |
|
|
|
- app/build/outputs/ |
|
|
|
|
|
|
|
|
|
|
|
unitTests: |
|
|
|
#unitTests: |
|
|
|
|
|
|
|
stage: test |
|
|
|
|
|
|
|
script: |
|
|
|
|
|
|
|
- ./gradlew -Pci --console=plain :app:testDebug |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
instrumentedTests: |
|
|
|
stage: test |
|
|
|
stage: test |
|
|
|
script: |
|
|
|
script: |
|
|
|
- ./gradlew -Pci --console=plain :app:testDebug |
|
|
|
- wget --quiet --output-document=android-wait-for-emulator https://raw.githubusercontent.com/travis-ci/travis-cookbooks/0f497eb71291b52a703143c5cd63a217c8766dc9/community-cookbooks/android-sdk/files/default/android-wait-for-emulator |
|
|
|
|
|
|
|
- chmod +x android-wait-for-emulator |
|
|
|
|
|
|
|
- android-sdk-linux/tools/bin/sdkmanager --update > update.log |
|
|
|
|
|
|
|
- android-sdk-linux/tools/bin/sdkmanager "platform-tools" "emulator" "system-images;android-${EMULATOR_VERSION};default;armeabi-v7a" > installEmulator.log |
|
|
|
|
|
|
|
- echo no | android-sdk-linux/tools/bin/avdmanager create avd -n test -k "system-images;android-${EMULATOR_VERSION};default;armeabi-v7a" |
|
|
|
|
|
|
|
- android-sdk-linux/emulator/emulator -avd test -no-window -no-audio & |
|
|
|
|
|
|
|
- ./android-wait-for-emulator |
|
|
|
|
|
|
|
- adb shell input keyevent 82 |
|
|
|
|
|
|
|
- ./gradlew connectedCheck |