sudo: required
dist: trusty

language: java
jdk:
  - oraclejdk8
  - openjdk8

before_cache:
  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
  - rm -fr $HOME/.gradle/caches/*/plugin-resolution/
  - rm -f $HOME/.gradle/caches/minecraft/ForgeVersion.json
  - rm -f $HOME/.gradle/caches/minecraft/ForgeVersion.json.etag
  - rm -fr $HOME/.gradle/caches/minecraft/deobfedDeps
  - rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.bin
  - rm -f $HOME/.gradle/caches/*/fileHashes/fileHashes.lock

cache:
  directories:
    - '$HOME/.m2/repository'
    - '$HOME/.sonar/cache'
    - '$HOME/.gradle/wrapper'
    - '$HOME/.gradle/caches'

addons:
  sonarcloud:
    organization: "appliedenergistics"

install: "./gradlew setupCIWorkspace"
script: 
  - "./gradlew build"
  - "./gradlew test"
  - "./gradlew sonarqube"
