language: android

android:
  components:
    # Use the latest revision of Android SDK Tools
    - tools
    - platform-tools

    # The BuildTools version used by your project
    - build-tools-23.0.2

    # The SDK version used to compile your project
    - android-23

    # For AppCompat
    - extra

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

jdk:
  - oraclejdk8

language: android

android:
  components:
    # Use the latest revision of Android SDK Tools
    - tools
    - platform-tools

    # The BuildTools version used by your project
    - build-tools-23.0.2

    # The SDK version used to compile your project
    - android-23

    # For AppCompat
    - extra
    
# Emulator Management: Create, Start and Wait
before_script:
  - echo no | android create avd --force -n test -t android-23 --abi default/x86
  - emulator -avd test -no-audio -no-window &
  - android-wait-for-emulator
  # - adb shell input keyevent 82 &

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

jdk:
  - oraclejdk8

Create emulator to run tests
Create emulator to run tests