language: java
jdk:
  - oraclejdk8

sudo: false
env:
  - TERM=dumb

before_install:
  - chmod +x gradlew

script:
  - ./gradlew build --stacktrace

after_success:
  - ./gradlew jacocoTestReport coveralls --stacktrace

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

language: java
jdk:
  - oraclejdk8

sudo: false
env:
  - TERM=dumb

before_install:
  - chmod +x gradlew

script:
  - ./gradlew build --stacktrace

after_success:
  - ./gradlew jacocoTestReport coveralls --stacktrace

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
  directories:
    - $HOME/.gradle/caches/
    - $HOME/.gradle/wrapper/

Use Travis cache for Gradle wrappers
Use Travis cache for Gradle wrappers

Additional information could be found here:
https://docs.travis-ci.com/user/languages/java#Projects-Using-Gradle
