language: android

android:
  components:
    - tools
    - tools
    - platform-tools
    - build-tools-24.0.3
    - android-24
    - sys-img-armeabi-v7a-google_apis-24
    - extra
    - extra-android-m2repository

script:
  ./gradlew build test

jdk:
  - oraclejdk8

sudo: false

before_cache:
  - rm -rf $HOME/.m2/repository/io/michaelrocks/lightsaber-
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
  directories:
    - $HOME/.m2
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

install:
  - ./gradlew assemble publishToMavenLocal -Pbootstrap=true --no-daemon --rerun-tasks

before_script:
  - echo no | android create avd --force -n test -t android-24 -b armeabi-v7a -g google_apis
  - emulator -avd test -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
  - ./gradlew check connectedCheck --no-daemon

language: android

android:
  components:
    - tools
    - tools
    - platform-tools
    - build-tools-24.0.3
    - android-24
    - sys-img-armeabi-v7a-google_apis-24
    - extra
    - extra-android-m2repository

script:
  ./gradlew build test

jdk:
  - oraclejdk8

sudo: false

before_cache:
  - rm -rf $HOME/.m2/repository/io/michaelrocks/lightsaber-
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

cache:
  directories:
    - $HOME/.m2
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

install:
  - ./gradlew assemble publishToMavenLocal -Pbootstrap=true --no-daemon --rerun-tasks

before_script:
  - echo no | android create avd --force -n test -t android-24 -b armeabi-v7a -g google_apis
  - emulator -avd test -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
  - ./gradlew check connectedCheck --no-daemon

Remove non-working -no-audio flag for emulator
Remove non-working -no-audio flag for emulator
