dist: precise
language: java
jdk:
  - oraclejdk8

# Works around an issue in Travis, see
# https://github.com/travis-ci/travis-ci/issues/5227.
#
# The fix below is due to @BanzaiMan, see
# https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165131913
addons:
  hosts:
    - test-host
  hostname: test-host

after_success:
  - ./gradlew cobertura coveralls

before_cache:
  - rm -f  $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/

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