# vim: et ts=2 sts=2 sw=2

language: android
jdk: oraclejdk8

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
  directories:
  - $HOME/.gradle/caches/
  - $HOME/.gradle/wrapper/

env:
  matrix:
    - ANDROID_TARGET=android-24  ANDROID_ABI=armeabi-v7a

android:
  components:
    - tools
    - platform-tools
    - tools
    - build-tools-25.0.2
    - android-25
    - android-24
    - extra-android-m2repository
    - sys-img-${ANDROID_ABI}-${ANDROID_TARGET}

before_script:
  - set -e
  - gradle wrapper -b wrapper.gradle
  - cp travis.gradle.properties gradle.properties
  - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
  - export QEMU_AUDIO_DRV=none
  - emulator -avd test -no-window &

script:
  - set -e
  - ./gradlew check jacocoTestReport
  - ./gradlew check assembleAndroidTest
  - android-wait-for-emulator
  - adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
  - adb shell input keyevent 82
  - ./gradlew connectedCheck

after_success: bash <(curl -s https://codecov.io/bash)

# vim: et ts=2 sts=2 sw=2

language: android
jdk: oraclejdk8

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
cache:
  directories:
  - $HOME/.gradle/caches/
  - $HOME/.gradle/wrapper/

env:
  matrix:
    - ANDROID_TARGET=android-22  ANDROID_ABI=armeabi-v7a

android:
  components:
    - tools
    - platform-tools
    - tools
    - build-tools-25.0.2
    - android-25
    - android-22
    - extra-android-m2repository
    - sys-img-${ANDROID_ABI}-${ANDROID_TARGET}

before_script:
  - set -e
  - gradle wrapper -b wrapper.gradle
  - cp travis.gradle.properties gradle.properties
  - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
  - export QEMU_AUDIO_DRV=none
  - emulator -avd test -no-window &

script:
  - set -e
  - ./gradlew check jacocoTestReport
  - ./gradlew check assembleAndroidTest
  - android-wait-for-emulator
  - adb shell setprop dalvik.vm.dexopt-flags v=n,o=v
  - adb shell input keyevent 82
  - ./gradlew connectedCheck

after_success: bash <(curl -s https://codecov.io/bash)

Use API 22 for Travis
Use API 22 for Travis
