language: android
jdk:
  - oraclejdk8
android:
  components:
    - tools
    - build-tools-26.0.2
    - platform-tools
    - tools # Running this twice get's you the latest build tools

before_install:
  - touch /home/travis/.android/repositories.cfg

install:
  - echo yes | sdkmanager "tools"
  - echo yes | sdkmanager "platforms;android-26" # Latest platform required by SDK tools
  - echo yes | sdkmanager "extras;android;m2repository"
  - echo yes | sdkmanager "extras;google;m2repository"
  - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"
  - echo yes | sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"

script:
   - ./gradlew build

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

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


language: android
jdk:
  - oraclejdk8
android:
  components:
    - tools
    - build-tools-26.0.2
    - platform-tools
    - tools # Running this twice get's you the latest build tools

before_install:
  - touch /home/travis/.android/repositories.cfg

install:
  - echo yes | $ANDROID_HOME/tools/bin/sdkmanager "tools"
  - echo yes | $ANDROID_HOME/tools/bin/sdkmanager "platforms;android-26" # Latest platform required by SDK tools
  - echo yes | $ANDROID_HOME/tools/bin/sdkmanager "extras;android;m2repository"
  - echo yes | $ANDROID_HOME/tools/bin/sdkmanager "extras;google;m2repository"
  - echo yes | $ANDROID_HOME/tools/bin/sdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout;1.0.2"
  - echo yes | $ANDROID_HOME/tools/bin/sdkmanagersdkmanager "extras;m2repository;com;android;support;constraint;constraint-layout-solver;1.0.2"

script:
   - ./gradlew build

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

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


Use absolute path to sdkmanager.
Use absolute path to sdkmanager.
