Skip to content

Instantly share code, notes, and snippets.

@st235
Created February 25, 2018 13:00
Show Gist options
  • Save st235/28b56ba5bff4afe9c4cc735bd51bc32a to your computer and use it in GitHub Desktop.
Save st235/28b56ba5bff4afe9c4cc735bd51bc32a to your computer and use it in GitHub Desktop.
language: android
jdk: oraclejdk8
sudo: false
notifications:
email:
- st235@yandex.ru
env:
matrix:
- ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
- ANDROID_TARGET=android-21 ANDROID_ABI=armeabi-v7a
global:
- ADB_INSTALL_TIMEOUT=10
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- $HOME/.gradle/daemon
- $HOME/.gradle/native
- $HOME/.gradle/wrapper
android:
update_sdk: true
components:
- platform-tools
- tools
- build-tools-26.0.1
- android-21
- android-19
- android-26
# Additional components
- extra-google-google_play_services
- extra-google-m2repository
- extra-android-m2repository
# System images
- sys-img-armeabi-v7a-android-19
- sys-img-armeabi-v7a-android-21
licenses:
- 'android-sdk-preview-license-52d11cd2'
- 'android-sdk-preview-license-.+'
- 'android-sdk-license-.+'
- 'google-gdk-license-.+'
before_script:
# Check and allow permissions
- chmod +x gradlew
# Setup AVD
- android list targets
- echo no | android create avd --force --name test --target $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
script:
- echo "Travis branch is $TRAVIS_BRANCH"
- echo "Travis branch is in pull request $TRAVIS_PULL+REQUEST"
- android-wait-for-emulator
- adb devices #Display list of devices
- adb shell input keyevent 82 &
- ./gradlew build jacocoTestReport
- ./gradlew connectedCheck -PdisablePreDex --stacktrace
before_install:
- pip install --user codecov
after_success:
- codecov
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment