diff --git a/.travis.yml b/.travis.yml index b534dff6..ad69a486 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,22 +2,37 @@ language: android jdk: oraclejdk8 sudo: false +cache: + directories: + - ${TRAVIS_BUILD_DIR}/gradle/caches/ + - ${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/ + +env: + global: + - ANDROID_API_LEVEL=26 + - EMULATOR_API_LEVEL=26 + - ANDROID_BUILD_TOOLS_VERSION=26.0.0 + - ANDROID_ABI=armeabi-v7a + - ANDROID_TAG=google_apis + - ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default) + android: components: + - tools - platform-tools - tools - - build-tools-26.0.0 - - android-26 - - sys-img-armeabi-v7a-android-26 + - build-tools-$ANDROID_BUILD_TOOLS_VERSION + - android-$ANDROID_API_LEVEL + - android-$EMULATOR_API_LEVEL + - sys-img-armeabi-v7a-google_apis-$ANDROID_API_LEVEL + - sys-img-armeabi-v7a-google_apis-$EMULATOR_API_LEVEL - extra-android-m2repository - extra-android-support - extra-google-m2repository before_script: - # Create and start emulator - - echo no | android create avd --force -n test -t android-26 --abi armeabi-v7a + - echo no | android create avd --force -n test -t "android-"$EMULATOR_API_LEVEL --abi $ANDROID_ABI - emulator -avd test -no-skin -no-audio -no-window & - android-wait-for-emulator - - adb shell input keyevent 82 & script: travis_wait 60 ./gradlew clean connectedAndroidTest -PdisablePreDex --stacktrace \ No newline at end of file