language: java

sudo: required
dist: trusty

matrix:
  include:
  - jdk: oraclejdk8
    env: BUILD_JDK=ORACLE_JDK_8
  - jdk: oraclejdk11
    env: BUILD_JDK=ORACLE_JDK_11
  - arch: arm64
  allow_failures:
  - env: BUILD_JDK=ORACLE_JDK_11

# https://docs.travis-ci.com/user/languages/java/#maven-dependency-management
install:
  - if [ "${TRAVIS_CPU_ARCH}" == "arm64" ]; then
      sudo apt-get install -y maven openjdk-11-jdk;
      export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-arm64;
      export PATH=$JAVA_HOME/bin:$PATH;
    fi
  - mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V -DminimumPriority=1

after_success:
  - bash <(curl -s https://codecov.io/bash)

cache:
  directories:
  - $HOME/.m2/
