language: java

sudo: false # run on container-based infrastructure

cache:
  directories:
    - $HOME/.gradle

jdk:
  - openjdk6
  - openjdk7
  - oraclejdk8

env:
  matrix:
    - VARIANT=2.0
    - VARIANT=2.3
    - VARIANT=2.4
  global:
    # SIGNING_PASSWORD
    - secure: "GBvPdDAaMfr0iAYHzVxhMIBVHFanEPY+69CbEFijbZjhv8h0FPvuLos2p1K5/hbmNkQ1Hd2+CHsm3ErvXQHXtpXn0HmKvzSP7pnPk83iRNVGPieasvfnKiSohZeEplkAK6kbK8sZbjJRUFqUZtwyPtWfs244rCOo++D3KtfggzQ="
    # SONATYPE_OSS_PASSWORD
    - secure: "Y2PbI07I8M8k1qkwN671HdcLPPpnjATWya/m4PDIICioXkkdJrQzpj5x57efAJEWx2upI8PpgGm8ekUd2F/6l1rq0n4DnGHwGTNe1PDAXUw5qFt66RnqrfIVh2eUvPuQk6bXczLV39GksqqD1T/HS6KofknXpHKzk/JeCiiGoxI="
    # GITHUB_TOKEN
    - secure: "YhBI9LWk4AlRSOmt0aBo0TphuVIzHIVdPGClg35S1b2I6xbc0gRIVXb+ySBZIhFkqaicPFTjO2FXerXEr6SJwz5y3LvA5oBWJC4U/9FdegoP9PopZwiAKA0KLTuBMFrTAjTHAmwJePO7a8yqNCbjKfwEc9hbM64YU+sSXdUJfEU="

matrix:
  exclude:
    # Groovy 2.0 doesn't support Java 8
    - jdk: oraclejdk8
      env: VARIANT=2.0
    # Reduce Travis workload (currently 5 concurrent builds are allowed)
    # See travisCiBuild task for mandatory combinations
    - jdk: oraclejdk8
      env: VARIANT=2.3
    - jdk: openjdk7
      env: VARIANT=2.0
    - jdk: openjdk7
      env: VARIANT=2.4

install: true

script: ./gradlew travisCiBuild -Dvariant=$VARIANT