dist: trusty

language: java

matrix:
  include:
    - jdk: oraclejdk8
      env: IDEA_VERSION="14.0.5" COVERALLS=true SONARQUBE=true
    - jdk: oraclejdk8
      env: IDEA_VERSION="15.0.6"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2016.3.7"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2017.1.5"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2017.2.5"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2017.3.2"
    - jdk: oraclejdk8
      env: IDEA_VERSION="LATEST-EAP-SNAPSHOT"
    - jdk: oraclejdk8
      env: IDEA_VERSION="LATEST-TRUNK-SNAPSHOT"

install: ./gradlew -P ideaVersion=$IDEA_VERSION assemble

script: ./gradlew -P ideaVersion=$IDEA_VERSION build

after_success:
  - if [ "$COVERALLS" == "true" ]; then ./gradlew -P ideaVersion=$IDEA_VERSION cobertura coveralls; fi
  - if [ "$SONARQUBE" == "true" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./gradlew sonarqube -Dsonar.login=$SONAR_TOKEN; fi

dist: trusty

language: java

matrix:
  include:
    - jdk: oraclejdk8
      env: IDEA_VERSION="14.0.5" COVERALLS=true SONARQUBE=true
    - jdk: oraclejdk8
      env: IDEA_VERSION="15.0.6"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2016.3.7"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2017.1.5"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2017.2.5"
    - jdk: oraclejdk8
      env: IDEA_VERSION="2017.3.2"
    - jdk: oraclejdk8
      env: IDEA_VERSION="LATEST-EAP-SNAPSHOT"
    - jdk: oraclejdk8
      env: IDEA_VERSION="LATEST-TRUNK-SNAPSHOT"
  allow_failures:
    - jdk: oraclejdk8
      env: IDEA_VERSION="LATEST-TRUNK-SNAPSHOT"

install: ./gradlew -P ideaVersion=$IDEA_VERSION assemble

script: ./gradlew -P ideaVersion=$IDEA_VERSION build

after_success:
  - if [ "$COVERALLS" == "true" ]; then ./gradlew -P ideaVersion=$IDEA_VERSION cobertura coveralls; fi
  - if [ "$SONARQUBE" == "true" ] && [ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./gradlew sonarqube -Dsonar.login=$SONAR_TOKEN; fi

Build with LATEST-TRUNK-SNAPSHOT is allowed to fail
Build with LATEST-TRUNK-SNAPSHOT is allowed to fail
