language: java sudo: false jdk: - openjdk11 cache: directories: - $HOME/.m2 env: global: - secure: "lV9OwUbHMrMpLUH1CY+Z4puLDdFXytudyPlG1eGRsesdpuG6KM3uQVz6uAtf6lrU8DRbMM/T7ML+PmvQ4UoPPYLdLxESLLBat2qUPOIVBOhTSlCc7I0DmGy04CSvkeMy8dPaQC0ukgNiR7zwoNzfcpGRN/U9S8tziDruuHoZSrg=" # BINTRAY_API_KEY - secure: "oWFgRTVP6lyTa7qVxlvkpm20MtVc3BtmsNXQJS6bfg2A0o/iCQMNx7OD59BaafCLGRKvCcJVESiC8FlSylVMS7CDSyYu0gg70NUiIuHp4NBM5inFWYCy/PdQsCTzr5uvNG+rMFQpMFRaCV0FrfM3tLondcVkhsHL68l93Xoexx4=" # CODACY_PROJECT_TOKEN - secure: "zJxgytA2Ks5Xzv+7kUaUq+EBFNQw9Qec63lcMJVuXVWczjL16nKW1EzzV515ag+OWL46z3lEPForDhufw0VtFnNmaX68jkO0mp01eLrHApc1llN2Y/U8GBXfNNazN4+Kom4H+z/AO+wJr8EsKMMUczCdQ3APgd9uVI0hzXw/Z3M=" # GITHUB_API_KEY addons: apt: packages: - haveged install: - curl -o $HOME/.m2/settings.xml https://gist.githubusercontent.com/cryptobot/cf5fbd909c4782aaeeeb7c7f4a1a43da/raw/e60ee486e34ee0c79f89f947abe2c83b4290c6bb/settings.xml - mvn -fmain/pom.xml clean install -DskipTests org.codehaus.mojo:versions-maven-plugin:help dependency:go-offline -Pcoverage,release # "clean install" needed until we can exclude artifacts currently in the reactor, see https://maven.apache.org/plugins/maven-dependency-plugin/go-offline-mojo.html#excludeReactor and https://issues.apache.org/jira/browse/MDEP-568 script: - mvn --update-snapshots -fmain/pom.xml clean test verify -Pcoverage after_success: - curl -o ~/codacy-coverage-reporter.jar https://oss.sonatype.org/service/local/repositories/releases/content/com/codacy/codacy-coverage-reporter/4.0.2/codacy-coverage-reporter-4.0.2-assembly.jar - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/commons/target/site/jacoco/jacoco.xml --partial - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/keychain/target/site/jacoco/jacoco.xml --partial - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/ui/target/site/jacoco/jacoco.xml --partial - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar report -l Java -r main/launcher/target/site/jacoco/jacoco.xml --partial - $JAVA_HOME/bin/java -jar ~/codacy-coverage-reporter.jar final before_deploy: - | if [[ -n "$TRAVIS_TAG" ]]; then mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=$TRAVIS_TAG elif [[ $TRAVIS_BRANCH == "develop" ]] && [[ $TRAVIS_PULL_REQUEST == "false" ]]; then mvn -fmain/pom.xml org.codehaus.mojo:versions-maven-plugin:set -DnewVersion=SNAPSHOT-$(echo $TRAVIS_COMMIT | head -c7) fi - mvn -fmain/pom.xml clean package -Prelease -DskipTests deploy: - provider: script # SNAPSHOTS skip_cleanup: true script: >- curl -T main/ant-kit/target/antkit.zip -u cryptobot:${BINTRAY_API_KEY} -H "X-Bintray-Package:ant-kit" -H "X-Bintray-Version:continuous" -H "X-Bintray-Override:1" -H "X-Bintray-Publish:1" https://api.bintray.com/content/cryptomator/cryptomator/antkit-continuous.zip on: repo: cryptomator/cryptomator branch: develop condition: $TRAVIS_TAG = '' - provider: releases # RELEASE prerelease: false api_key: $GITHUB_API_KEY file: - "main/uber-jar/target/Cryptomator-$TRAVIS_TAG.jar" skip_cleanup: true on: repo: cryptomator/cryptomator tags: true - provider: script skip_cleanup: true script: >- curl -T main/ant-kit/target/antkit.zip -u cryptobot:${BINTRAY_API_KEY} -H "X-Bintray-Package:ant-kit" -H "X-Bintray-Version:${TRAVIS_TAG}" -H "X-Bintray-Override:1" -H "X-Bintray-Publish:1" https://api.bintray.com/content/cryptomator/cryptomator/antkit-${TRAVIS_TAG}.zip on: repo: cryptomator/cryptomator tags: true