language: android

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

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

android:
  components:
    - tools
    - platform-tools
    - build-tools-23.0.2
    - android-23
    - extra-android-m2repository
    - sys-img-x86-android-tv-21

before_script:
  - echo no | android create avd --force -n test -t android-21 --abi x86
  - emulator -avd test -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
   - ./gradlew assemble connectedAndroidTest

language: android

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock

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

android:
  components:
    - tools
    - platform-tools
    - build-tools-23.0.2
    - android-23
    - extra-android-m2repository
    - sys-img-x86-android-tv-21

before_script:
  - echo no | android create avd --force -n test -t android-21 --abi android-tv/x86
  - emulator -avd test -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
   - ./gradlew assemble connectedAndroidTest

Use Android TV x86 ABI for emulator
Use Android TV x86 ABI for emulator