Skip to content

Commit

Permalink
Update build tools in travis config. (#483)
Browse files Browse the repository at this point in the history
- Use latest available SDK 24 emulator, as tests with generated sources are broken on SDK 19 emulator (`IllegalAccessError`).
- Update to v25 build tools.
- Simplify some commands (emulator script is now built-in, Gradle properly supported).
Source: https://github.com/googlemaps/android-maps-utils/blob/master/.travis.yml
  • Loading branch information
greenrobot-team authored Oct 31, 2016
1 parent dae9c42 commit a47dee4
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 33 deletions.
47 changes: 31 additions & 16 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,43 @@
language: android
jdk: oraclejdk8
# Use the Travis Container-Based Infrastructure
sudo: false
jdk:
- oraclejdk8

cache:
directories:
- ${TRAVIS_BUILD_DIR}/gradle/caches/
- ${TRAVIS_BUILD_DIR}/gradle/wrapper/dists/

env:
global:
# increase adb timeout (2 minutes by default)
- ADB_INSTALL_TIMEOUT=8
matrix:
- ANDROID_SDKS=android-23,sysimg-23 ANDROID_TARGET=android-19 ANDROID_ABI=armeabi-v7a
- ANDROID_API_LEVEL=24
- ANDROID_BUILD_TOOLS_VERSION=25.0.0
- ANDROID_ABI=armeabi-v7a
- ADB_INSTALL_TIMEOUT=20 # minutes (2 minutes by default)

android:
components:
- tools # to get the new `repository-11.xml`
- platform-tools
- tools
- build-tools-23.0.3
- android-23
- tools # to install Android SDK tools 25.1.x, https://github.com/travis-ci/travis-ci/issues/6040#issuecomment-219367943
- build-tools-$ANDROID_BUILD_TOOLS_VERSION
- android-$ANDROID_API_LEVEL
# Support library
- extra-android-support
# Latest artifacts in local repository
- extra-android-m2repository
# Specify at least one system image
- sys-img-armeabi-v7a-android-$ANDROID_API_LEVEL

before_install:
- echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-audio -no-window &
- mkdir "$ANDROID_HOME/licenses" || true
- echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_HOME/licenses/android-sdk-license"

before_script:
- chmod +x gradlew
- chmod +x ./ci/wait_for_emulator
- ./ci/wait_for_emulator
- adb shell input keyevent 82 &
# Create and start emulator
- echo no | android create avd --force -n test -t "android-"$ANDROID_API_LEVEL --abi $ANDROID_ABI
- emulator -avd test -no-skin -no-window &
- android-wait-for-emulator

script:
- TERM=dumb ./gradlew connectedCheck
- ./gradlew clean connectedCheck --stacktrace
17 changes: 0 additions & 17 deletions ci/wait_for_emulator

This file was deleted.

0 comments on commit a47dee4

Please sign in to comment.