language: java
jdk: openjdk11
sudo: true

install:
  - wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
  - java -jar BuildTools.jar --rev 1.13.1
  - wget https://www.robindebaets.be/LeaderHeadsAPI.jar
  - mvn install:install-file -Dfile=LeaderHeadsAPI.jar -DgroupId=me.robin -DartifactId=leaderheads -Dversion=3.1.6 -Dpackaging=jar
  - jdk_switcher use openjdk8
  - git clone https://github.com/Gnat008/perworldinventory-kt.git
  - cd perworldinventory-kt
  - mvn clean install
  - cd ../
  - export JAVA_HOME=$HOME/openjdk11
  - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh && . ./install-jdk.sh -F 11 -L GPL
  - git clone https://github.com/I-Al-Istannen/MiniNBT.git
  - cd MiniNBT
  - mvn clean install
  - cd ../

script:
  - cd buildinggame
  - mvn clean install
language: java
jdk: openjdk11
sudo: true

install:
  - wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar -O BuildTools.jar
  - java -jar BuildTools.jar --rev 1.13.2
  - wget https://www.robindebaets.be/LeaderHeadsAPI.jar
  - mvn install:install-file -Dfile=LeaderHeadsAPI.jar -DgroupId=me.robin -DartifactId=leaderheads -Dversion=3.1.6 -Dpackaging=jar
  - jdk_switcher use openjdk8
  - git clone https://github.com/Gnat008/perworldinventory-kt.git
  - cd perworldinventory-kt
  - mvn clean install
  - cd ../
  - git clone https://github.com/I-Al-Istannen/MiniNBT.git
  - cd MiniNBT
  - mvn clean install
  - cd ../
  - export JAVA_HOME=$HOME/openjdk11
  - wget https://github.com/sormuras/bach/raw/master/install-jdk.sh && . ./install-jdk.sh -F 11 -L GPL

script:
  - cd buildinggame
  - mvn clean install
Build MiniNBT with Java 8
Build MiniNBT with Java 8

Try building MiniNBT with Java 8 instead of Java 11, since Java 11 is
giving errors.
