language: android
android:
  components:
    - tools
    - build-tools-23.0.2
    - android-23
    - extra-android-m2repository

before_install:
 - chmod +x gradlew

script:
   - ./gradlew build connectedCheck
language: android
jdk: oraclejdk8
env:
  global:
    - ANDROID_TARGET=android-23
    - ANDROID_ABI=armeabi-v7a
    - ADB_INSTALL_TIMEOUT=8 # minutes (2 minutes by default)

android:
 components:
 - tools
 - platform-tools
 - build-tools-23.0.2
 - android-23
 - extra-android-m2repository
 - sys-img-${ANDROID_ABI}-${ANDROID_TARGET}

before_install:
 - chmod +x gradlew

script:
 - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
 - emulator -avd test -no-skin -no-audio -no-window &
 - android-wait-for-emulator
 - ./gradlew clean
 - ./gradlew assembleDebug
 - ./gradlew assembleDebugAndroidTest
 - adb install app/build/outputs/apk/app-debug.apk
 - adb install app/build/outputs/apk/app-debug-androidTest-unaligned.apk
 - adb shell am instrument -w com.google.samples.apps.topeka.test/android.support.test.runner.AndroidJUnitRunner
 - ./gradlew connectedCheck
Add system image for Travis CI
Add system image for Travis CI
