language: java
install: true
before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - chmod +x gradlew

jdk: oraclejdk11

git:
  depth: false
  
addons:
  sonarcloud:
    organization: "gurkenlabs-github"

script: 
- ./gradlew fullbuild
- jdk_switcher use oraclejdk8
- ./gradlew fullbuild
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then 
    sonar-scanner; 
  fi

cache:
  directories:
    - '$HOME/.m2/repository'
    - '$HOME/.sonar/cache'
    - '$HOME/.gradle/caches/'
    - '$HOME/.gradle/wrapper/'
language: java
install: true
before_install:
  - "export DISPLAY=:99.0"
  - "sh -e /etc/init.d/xvfb start"
  - chmod +x gradlew

jdk: openjdk11

git:
  depth: false
  
addons:
  sonarcloud:
    organization: "gurkenlabs-github"

script: 
- ./gradlew fullbuild
- jdk_switcher use openjdk8
- ./gradlew fullbuild
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then 
    sonar-scanner; 
  fi

cache:
  directories:
    - '$HOME/.m2/repository'
    - '$HOME/.sonar/cache'
    - '$HOME/.gradle/caches/'
    - '$HOME/.gradle/wrapper/'
Use OpenJDK because Oracle doesn't like people to use their Java distribution anymore.
Use OpenJDK because Oracle doesn't like people to use their Java distribution anymore.
