language: android

env:
  matrix:
    - ANDROID_SDKS=android-22,sysimg-22  ANDROID_TARGET=android-22  ANDROID_ABI=armeabi-v7a

jdk:
 - oraclejdk7
 - oraclejdk8

android:
  components:
    - build-tools-22.0.1
    - android-22
    - sys-img-armeabi-v7a-android-22
    - extra-android-support
    - extra-android-m2repository

before_install:
  - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
  - emulator -avd test -no-skin -no-audio -no-window &

before_script:
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
  - ./gradlew clean check :sample:installDebug
  - adb shell am instrument -w io.sweers.barber.sample.test/android.test.InstrumentationTestRunner

branches:
  except:
    - gh-pages

notifications:
  email: false

sudo: false

cache:
  directories:
    - $HOME/.gradle
language: android

env:
  matrix:
    - ANDROID_SDKS=android-22,sysimg-22  ANDROID_TARGET=android-22  ANDROID_ABI=armeabi-v7a

jdk:
 - oraclejdk8

android:
  components:
    - build-tools-22.0.1
    - android-22
    - sys-img-armeabi-v7a-android-22
    - extra-android-support
    - extra-android-m2repository

before_install:
  - echo no | android create avd --force -n test -t $ANDROID_TARGET --abi $ANDROID_ABI
  - emulator -avd test -no-skin -no-audio -no-window &

before_script:
  - android-wait-for-emulator
  - adb shell input keyevent 82 &

script:
  - ./gradlew clean check connectedAndroidTest

branches:
  except:
    - gh-pages

notifications:
  email: false

sudo: false

cache:
  directories:
    - $HOME/.gradle
Use connectedAndroidTest to run tests and remove jdk7 test
Use connectedAndroidTest to run tests and remove jdk7 test

No need for the second test
