language: android

android:
  components:
    - tools
    - platform-tools
    - build-tools-26.0.2
    - android-26
    - extra-google-m2repository
    - extra-android-m2repository

jdk:
  - oraclejdk8

before_install:
  - cat /etc/hosts # optionally check the content *before*
  - sudo hostname "$(hostname | cut -c1-63)"
  - sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
  - cat /etc/hosts # optionally check the content *after*

script:
  - travis_wait 30 ./gradlew -q -s -PbuildInfo.build.number=$TRAVIS_BUILD_NUMBER -PbuildInfo.buildUrl=https://travis-ci.org/${TRAVIS_REPO_SLUG}/builds/${TRAVIS_JOB_ID} -PbuildInfo.buildAgent.name=$USER -PbuildInfo.principal=$USER :groovy-android-sample-app:build
  - travis_wait 30 ./gradlew -q -s -Dscan -PbuildInfo.build.number=$TRAVIS_BUILD_NUMBER -PbuildInfo.buildUrl=https://travis-ci.org/${TRAVIS_REPO_SLUG}/builds/${TRAVIS_JOB_ID} -PbuildInfo.buildAgent.name=$USER -PbuildInfo.principal=$USER :groovy-android-gradle-plugin:build fullTest artifactoryPublish

branches:
  except:
    - gh-pages

cache:
  directories:
    - $HOME/.gradle
