language: java

sudo: false
dist: trusty

before_install:
  - unset _JAVA_OPTIONS
  - wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh

matrix:
  include:
# Java 9
    - jdk: oraclejdk9
      env: JDK='JDK 9' TARGET='-Pjava9'
      install: echo "The default Travis install script is being skipped!"
# Java 10
    - env: JDK='JDK 10' TARGET='-Pjava10'
      install: . ./install-jdk.sh -F 10 -L BCL
# Java 11
    - env: JDK='JDK 11' TARGET='-Pjava11'
      install: . ./install-jdk.sh -F 11 -L BCL
# The following environments are known to fail
  allow_failures:
    - env: JDK='JDK 10' TARGET='-Pjava10'
    - env: JDK='JDK 11' TARGET='-Pjava11'

script:
  - ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -Dnet.bytebuddy.test.ci=true -pl '!byte-buddy-gradle-plugin'
  - ./mvnw jacoco:prepare-agent verify jacoco:report ${TARGET} -Pintegration -Dfindbugs.skip=true -Dnet.bytebuddy.test.ci=true -pl '!byte-buddy-gradle-plugin'

language: java

sudo: false
dist: trusty

before_install:
  - unset _JAVA_OPTIONS
  - wget https://raw.githubusercontent.com/sormuras/bach/master/install-jdk.sh

matrix:
  include:
# Java 9
    - jdk: oraclejdk9
      env: JDK='JDK 9' TARGET='-Pjava9'
      install: echo "The default Travis install script is being skipped!"
# Java 10
    - env: JDK='JDK 10' TARGET='-Pjava10'
      install: . ./install-jdk.sh -F 10 -L GPL
# Java 11
    - env: JDK='JDK 11' TARGET='-Pjava11'
      install: . ./install-jdk.sh -F 11 -L BCL
# The following environments are known to fail
  allow_failures:
    - env: JDK='JDK 10' TARGET='-Pjava10'
    - env: JDK='JDK 11' TARGET='-Pjava11'

script:
  - ./mvnw install -DskipTests=true -Dmaven.javadoc.skip=true -Dnet.bytebuddy.test.ci=true -pl '!byte-buddy-gradle-plugin'
  - ./mvnw jacoco:prepare-agent verify jacoco:report ${TARGET} -Pintegration -Dfindbugs.skip=true -Dnet.bytebuddy.test.ci=true -pl '!byte-buddy-gradle-plugin'

Upgrade to JDK 10 General-Availability Release
Upgrade to JDK 10 General-Availability Release

As Oracle JDK 10 is no longer available from http://jdk.java.net/10/
the license option is flipped from `BCL` to `GPL`.
Travis CI does not yet provide an Oracle JDK 10 installation. See
https://github.com/travis-ci/travis-ci/issues/9368 for details.
