#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/
sudo: false
dist: trusty
language: java
jdk:
  - oraclejdk8
  - openjdk8
env:
  - GRADLE_OPTS="-Xmx512m -XX:MaxPermSize=256m"
script:
  - ./gradlew build jacocoTestReport
after_success:
  - bash <(curl -s https://codecov.io/bash)
deploy:
  provider: script
  script: ./gradlew -Prelease.customUsername=$GIT_USER -Prelease.customPassword=$GIT_PASSWORD -Prelease.disableChecks -Prelease.pushTagsOnly release bintrayUpload
  on:
    branch: master
    jdk: oraclejdk8
