language: java
install: true
before_install:
  - chmod +x gradlew
  - sudo apt-get -y install at-spi2-core

jdk:
  - openjdk8

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

services:
  - xvfb


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

jobs:
  include:
    - stage: "Fullbuild"
      name: "Build, report coverage, and create Docs"
      script: ./gradlew fullbuild --warning-mode all
    - stage: "Scan"
      name: "Sonarqube Scan"
      jdk: openjdk11
      script:
        export JAVA_HOME= "/usr/local/lib/jvm/openjdk11"
        if [ $TRAVIS_PULL_REQUEST = 'false' ]; then
          sonar-scanner;
        fi

language: java
install: true
before_install:
  - chmod +x gradlew
  - sudo apt-get -y install at-spi2-core

jdk:
  - openjdk8

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

services:
  - xvfb


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

jobs:
  include:
    - stage: "Fullbuild"
      name: "Build, report coverage, and create Docs"
      script: ./gradlew fullbuild --warning-mode all
    - stage: "Scan"
      name: "Sonarqube Scan"
      jdk: openjdk15
      script:
        if [ $TRAVIS_PULL_REQUEST = 'false' ]; then
          sonar-scanner;
        fi

Use jdk15 for sonar scan and fix syntax error.
Use jdk15 for sonar scan and fix syntax error.
