sudo: false

language: android

jdk: oraclejdk8

env:
  global:
    - GRADLE_OPTS='-Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dkotlin.incremental=false -DdisablePreDex'
    - ANDROID_TARGET=android-26
    - ANDROID_BUILD_TOOLS_VERSION=26.0.1
    - ANDROID_ABI=armeabi-v7a
    - ANDROID_EMULATOR_TARGET=android-22

android:
  components:
    - tools
    - build-tools-$ANDROID_BUILD_TOOLS_VERSION
    - $ANDROID_TARGET
    - $ANDROID_EMULATOR_TARGET
    - extra-google-google_play_services
    - extra-android-support
    - extra
    - sys-img-$ANDROID_ABI-$ANDROID_EMULATOR_TARGET

licenses:
  - 'android-sdk-license-.+'

before_install:
  - echo yes | android update sdk --all --filter build-tools-$ANDROID_BUILD_TOOLS_VERSION --no-ui --force

script:
  - echo no | android create avd --force -n test -t $ANDROID_EMULATOR_TARGET --abi $ANDROID_ABI
  - emulator -avd test -no-window &
  - ./gradlew check
  - android-wait-for-emulator
  - adb shell input keyevent 82 &
  - ./gradlew :demo:connectedAndroidTest

sudo: true

language: android

jdk: oraclejdk8

env:
  global:
    - GRADLE_OPTS='-Dorg.gradle.daemon=false -Dorg.gradle.parallel=false -Dkotlin.incremental=false -DdisablePreDex'
    - ANDROID_TARGET=android-26
    - ANDROID_BUILD_TOOLS_VERSION=26.0.1
    - ANDROID_ABI=armeabi-v7a
    - ANDROID_EMULATOR_TARGET=android-22

android:
  components:
    - tools
    - build-tools-$ANDROID_BUILD_TOOLS_VERSION
    - $ANDROID_TARGET
    - $ANDROID_EMULATOR_TARGET
    - extra-google-google_play_services
    - extra-android-support
    - extra
    - sys-img-$ANDROID_ABI-$ANDROID_EMULATOR_TARGET

licenses:
  - 'android-sdk-license-.+'

before_install:
  - echo yes | android update sdk --all --filter build-tools-$ANDROID_BUILD_TOOLS_VERSION --no-ui --force

before_script:
  - sudo service postgresql stop || true
  - sudo service mysql stop || true
  - sudo service memcached stop || true
  - sudo service bootlogd stop || true
  - sudo service elasticsearch stop || true
  - sudo service mongodb stop || true
  - sudo service neo4j stop || true
  - sudo service cassandra stop || true
  - sudo service riak stop || true
  - sudo service rsync stop || true
  - sudo service x11-common stop || true

script:
  - echo no | android create avd --force -n test -t $ANDROID_EMULATOR_TARGET --abi $ANDROID_ABI
  - emulator -avd test -no-window &
  - ./gradlew check
  - android-wait-for-emulator
  - adb shell input keyevent 82 &
  - ./gradlew :demo:connectedAndroidTest

Stop unnecessary services for Travis
Stop unnecessary services for Travis
