language: java
dist: trusty

env:
  global:
    - CI=true

#install:
#  - git fetch --unshallow --tags

addons:
  sonarcloud:
    organization: "ethauvin-github"

jdk:
  - oraclejdk8
  - openjdk14

before_install:
  - chmod +x gradlew

after_success:
  - |
      if [ "${TRAVIS_TEST_RESULT}" == 0 ] && [ "$TRAVIS_JDK_VERSION" == "openjdk14" ]; then
        ./gradlew sonarqube
      fi
