| # More details on how to configure the Travis build |
| # https://docs.travis-ci.com/user/customizing-the-build/ |
| |
| # Speed up build by leveraging travis caches |
| cache: |
| directories: |
| - $HOME/.gradle/caches/ |
| - $HOME/.gradle/wrapper/ |
| |
| # see https://docs.travis-ci.com/user/migrating-from-legacy/ and https://docs.travis-ci.com/user/ci-environment |
| sudo: false |
| |
| # Note that OracleJDK 9 is available for jdk_switcher only on Trusty. |
| # https://github.com/travis-ci/travis-ci/issues/7253#issuecomment-283671037 |
| dist: trusty |
| |
| group: edge |
| |
| language: java |
| |
| matrix: |
| include: |
| - jdk: oraclejdk8 |
| env: |
| - SKIP_RELEASE=true |
| - powermock.byte-code-framework=Javassist |
| - jdk: oraclejdk9 |
| env: |
| - SKIP_RELEASE=true |
| - powermock.byte-code-framework=Javassist |
| - jdk: oraclejdk8 |
| |
| #Below skips the installation step completely (https://docs.travis-ci.com/user/customizing-the-build/#Skipping-the-Installation-Step) |
| #We need it because otherwise Travis CI injects an awkward './gradlew assemble' step into the CI workflow |
| #We want to control and decide what Gradle tasks are executed |
| install: |
| - true |
| |
| script: |
| # We are using && below on purpose |
| # ciPerformRelease must run only when the entire build has completed |
| # This guarantees that no release steps are executed when the build or tests fail |
| - ./gradlew assemble -s -PcheckJava6Compatibility && ./gradlew -i -s check && ./gradlew -i ciPerformRelease |