language: java

matrix:
  include:
    - jdk: oraclejdk8
      env: TARGET=checkstyle
    - jdk: oraclejdk8
      env: TARGET=pmd
    - jdk: oraclejdk8
      env: TARGET=cpd
    - jdk: oraclejdk8
      env: TARGET=test
    - jdk: openjdk8
      env: TARGET=test
    - os: osx
      osx_image: xcode9.2
      env: TARGET=test

before_install:
  - if [ $TARGET == test ]; then
        if [ $TRAVIS_OS_NAME == osx ]; then
            brew update; brew upgrade python; brew install clasp;
        else
            sudo apt-get -qq update; sudo apt-get install -y clasp;
        fi
    fi

install:
  - ./gradlew assemble

before_script:
  - if [ $TARGET == test ]; then export DISPLAY=:0; ( Xvfb :0 -ac > /dev/null 2>&1 )& fi

script:
  - ./gradlew $TARGET
  - if [ $TARGET == test ]; then ./integration-tests/run.sh; fi

after_success:
  - if [ $TARGET == test -a $TRAVIS_JDK_VERSION == oraclejdk8 ]; then ./gradlew coveralls; fi

language: java

matrix:
  include:
    - jdk: oraclejdk8
      env: TARGET=checkstyle
    - jdk: oraclejdk8
      env: TARGET=pmd
    - jdk: oraclejdk8
      env: TARGET=cpd
    - jdk: oraclejdk8
      env: TARGET=test
    - jdk: openjdk8
      env: TARGET=test
    - jdk: oraclejdk11
      env: TARGET=test
    - jdk: openjdk11
      env: TARGET=test
    - os: osx
      osx_image: xcode9.2
      env: TARGET=test

before_install:
  - if [ $TARGET == test ]; then
        if [ $TRAVIS_OS_NAME == osx ]; then
            brew update; brew upgrade python; brew install clasp;
        else
            sudo apt-get -qq update; sudo apt-get install -y clasp;
        fi
    fi

install:
  - ./gradlew assemble

before_script:
  - if [ $TARGET == test ]; then export DISPLAY=:0; ( Xvfb :0 -ac > /dev/null 2>&1 )& fi

script:
  - ./gradlew $TARGET
  - if [ $TARGET == test ]; then ./integration-tests/run.sh; fi

after_success:
  - if [ $TARGET == test -a $TRAVIS_JDK_VERSION == oraclejdk8 ]; then ./gradlew coveralls; fi

Add testing with Java 11
Add testing with Java 11
