machine:
  java:
    version: openjdk8
  environment:
    TERM: dumb

dependencies:
  cache_directories:
    - "~/.m2"
    - "~/.gradle"

test:
  override:
    - ./gradlew build

machine:
  java:
    version: openjdk8
  environment:
    TERM: dumb

dependencies:
  pre:
    - rm -f ~/.gradle/caches/modules-2/modules-2.lock
    - rm -rf ~/.gradle/caches/*/{file-changes,fileHashes,plugin-resolution,scripts,scripts-remapped,gradle-script-kotlin}/
  cache_directories:
    - "~/.gradle/caches/"
    - "~/.gradle/wrapper/"

test:
  override:
    - ./gradlew build

Use Travis setup in CircleCI
Use Travis setup in CircleCI
