env:
  global:
  # for CodeClimate
    - CC_TEST_REPORTER_ID=83a2e05f875e3a67f60a1969f20a558a3de03a7592052c8bf52807d0e317f01a
language: java
jdk:
- oraclejdk8
- oraclejdk11
- oraclejdk-ea
- openjdk8
- openjdk9
- openjdk10
- openjdk11
- openjdk-ea
#  - openjdk7 # Disabled to avoid error java.security.NoSuchProviderException: no such provider: SunEC...
#  - oraclejdk7
# $ jdk_switcher use oraclejdk7
# Switching to Oracle JDK7 (java-7-oracle), JAVA_HOME will be set to /usr/lib/jvm/java-7-oracle
# update-java-alternatives: directory does not exist: /usr/lib/jvm/java-7-oracle
# ...
# ERROR: JAVA_HOME is set to an invalid directory: /usr/lib/jvm/java-7-oracle
#
#  - openjdk6 # gradle 3.1 requires java 7

matrix:
  allow_failures:
  - jdk: oraclejdk-ea

before_script:
  - chmod +x gradlew
# for CodeClimate
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
  - chmod +x ./cc-test-reporter
  - ./cc-test-reporter before-build
script:
  - ./gradlew check --info
after_success:
  - bash <(curl -s https://codecov.io/bash)
  - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
