language: android
jdk: oraclejdk8
sudo: false

android:
  components:
      - build-tools-27.0.3
      - android-27
      - extra-google-google_play_services
      - extra-google-m2repository
      - extra-android-m2repository
      - addon-google_apis-google-27

      - sys-img-armeabi-v7a-android-27
      - sys-img-armeabi-v7a-android-21

  licenses:
      - 'android-sdk-preview-license-52d11cd2'
      - 'android-sdk-license-.+'
      - 'google-gdk-license-.+'

cache:
    directories:
        - $HOME/.gradle

before_script:
  - android list targets
  - echo no | android create avd --force -n test -t android-27 --abi armeabi-v7a
  - emulator -avd test -no-skin -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell settings put global window_animation_scale 0 &
  - adb shell settings put global transition_animation_scale 0 &
  - adb shell settings put global animator_duration_scale 0 &
  - adb shell input keyevent 82 &

script:
    - ./gradlew test
    - ./gradlew connectedAndroidTest
    - ./gradlew check lint assembleDebug --stacktrace
language: android
jdk: oraclejdk8
sudo: false

android:
  components:
      - build-tools-27.0.3
      - android-22
      - extra-google-google_play_services
      - extra-google-m2repository
      - extra-android-m2repository
      - addon-google_apis-google-27

      - sys-img-armeabi-v7a-android-22

  licenses:
      - 'android-sdk-preview-license-52d11cd2'
      - 'android-sdk-license-.+'
      - 'google-gdk-license-.+'

cache:
    directories:
        - $HOME/.gradle

before_script:
  - android list targets
  - echo no | android create avd --force -n test -t android-22 --abi armeabi-v7a
  - emulator -avd test -no-skin -no-audio -no-window &
  - android-wait-for-emulator
  - adb shell settings put global window_animation_scale 0 &
  - adb shell settings put global transition_animation_scale 0 &
  - adb shell settings put global animator_duration_scale 0 &
  - adb shell input keyevent 82 &

script:
    - ./gradlew clean installDebug
    - ./gradlew check lint assembleDebug --stacktrace
    - ./gradlew testDebugUnitTest
    - ./gradlew connectedDebugAndroidTest

Use v22 emulator instead of v27
Use v22 emulator instead of v27
