From 69fefc8217055518e5d2a08e228fd9131d80ee16 Mon Sep 17 00:00:00 2001 From: Sha Sha Chu Date: Sat, 12 Oct 2019 20:56:48 -0700 Subject: [PATCH] Use Gradle on CI (#588) * Update CI builds to run with gradle * Update README.md Co-Authored-By: Yahor Berdnikau --- .buildscript/deploy_snapshot.sh | 29 ----------------------------- .travis.yml | 11 +++++------ README.md | 4 ++-- 3 files changed, 7 insertions(+), 37 deletions(-) delete mode 100755 .buildscript/deploy_snapshot.sh diff --git a/.buildscript/deploy_snapshot.sh b/.buildscript/deploy_snapshot.sh deleted file mode 100755 index cf3193d05a..0000000000 --- a/.buildscript/deploy_snapshot.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo. -# -# Adapted from https://coderwall.com/p/9b_lfq and -# https://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/ - -SLUG="pinterest/ktlint" -JDK="oraclejdk8" -BRANCH="master" - -set -e - -if [ "$TRAVIS_REPO_SLUG" != "$SLUG" ]; then - echo "Skipping snapshot deployment: wrong repository. Expected '$SLUG' but was '$TRAVIS_REPO_SLUG'." -elif [ "$TRAVIS_JDK_VERSION" != "$JDK" ]; then - echo "Skipping snapshot deployment: wrong JDK. Expected '$JDK' but was '$TRAVIS_JDK_VERSION'." -elif [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - echo "Skipping snapshot deployment: was pull request." -elif [ "$TRAVIS_BRANCH" != "$BRANCH" ]; then - echo "Skipping snapshot deployment: wrong branch. Expected '$BRANCH' but was '$TRAVIS_BRANCH'." -else - echo "Deploying snapshot..." - # Gradle - ./gradlew clean uploadArchives --no-daemon --no-parallel - # Maven - ./mvnw -Ddeploy=maven-central -DskipStaging=true -Dgpg.skip=true && ./mvnw -Ddeploy=github -Dgpg.skip=true -Dgithub.draft=true -Dgithub.description="https://github.com/pinterest/ktlint#access-to-the-latest-master-snapshot" - echo "Snapshot deployed!" -fi diff --git a/.travis.yml b/.travis.yml index f20fb71419..c7712d2955 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,14 +13,10 @@ script: - | if [[ $TRAVIS_REPO_SLUG == "pinterest/ktlint" && $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then # Gradle - ./gradlew build - # Maven - ./mvnw -Ddeploy=maven-central -DskipStaging=true -Dgpg.skip=true && ./mvnw -Ddeploy=github -Dgpg.skip=true -Dgithub.draft=true -Dgithub.description="https://github.com/pinterest/ktlint#access-to-the-latest-master-snapshot" + ./gradlew clean uploadArchives --no-daemon --no-parallel else # Gradle - ./gradlew build ktlint - # Maven - ./gradlew build && ./mvnw clean verify + ./gradlew clean build ktlint fi before_cache: @@ -38,3 +34,6 @@ env: - secure: sk+fF6EPGXCy85gm8cdKM0JXy3pMKRZSRaAE/gE+OWir9BjUj1clG3KZw5P/xPudiSMnNIRfluqxkLRCPWpawh/6Ixvs3falZAC9JVBu6OyHSjTXDp3zIr4Mv3NNMEefr775iRPzuf6iBUTTP2bZQ2P62CE3HOd83lB8Jm1QcDE7LIscMn96DGZt8BDi88fEjfSDCMcw87w+5zOM5prUoOlPp9dyxnskw9ncwmFLLrsJJJmcC0bvrTiE6Z1CduwNDOwYDDRgsEa6k2EEpBDrRSStDcXoF8zFTm79C5B81lkH2s+kylpp7XjOQPWQAs4+n/tQ0TIlvUG7YMyrtf/NVK+7oClQtVKAeWOD1sl+Z1Qs8h3+pk9xrTWFRgMYMSyjAbHAyaf7x+3Lv/uDs8yKdLc0QHa5kb6khJJ6M9wdQX6NDXopeuPIkacmHtknRi1BhUBzHCbiJDhxsQ08suaqjNtxVZ3ECh3GTLvnbTof3SN9IlUOu9SdS5iIGRGERxIY9YdNHHuT2zf95YNAkjS4zJqZG/q9rBxi5/YWgiBeSCARtqrEJ9aMMg3nvBFqsZs6AHB1KaAH8N15Z1n1EqzISn1/Mk5B17SG6+FSNswYomKP54HxeILE35iXOIRGcNyeE5Gr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q+aXDmcJeuOYOCo66zpUkXRNFR4Kxr5Imw1VipGUvTHnHyRyjEGhR8JlTDCKanSWlDpknjsjuYf/+ndzmXzmgOTRRfc/L7RRnkOPMPAXp5IJ1fgbSQ3ClB9qRsCiiHVd1VAH1Jq2tTsMyuV2G4SgmEZaFAhcRFWp0z9jK5AHQNLYexbZ7fzSyDyvrk531pCAGZgZ4r8SYZaKSVHmBH3WP1mbYjJl9Z34x/Ty/6QIUpBDpP0ablZ9hws7GQQ2VIxzP0IRx0z98Sjh9GsxJHtqt94bYnfbZOa570AaRmtykGzVHqMh1PfyoMFl94wscPH9IWCXxYEngf9wwlyaPYPv0RRp3afGEjOZiVC5X+7yPphpj129/UBjbVXAFHAfodpvfZgV/p4GOGwl94Wh5pbqrbWfGbBZCYr+gkWZYw7YI57YBCX8gRLybIBm0Q2x7SBYENoLLQTzTM9agTgpgpIGcG8vjTg8zgSYKFs97iPt6PrUU1Wo7c9qzmGC+6jIoYAGceT7184n/CCagKjDiM90jes5MxY4NVts6sKBpuinjoxJuU/LIjJ+TnGBeeauHE1fL2NUYUKa6lVeYUYzHpSlHJI700yUPm1VsbSyX+gwsDTyt2myyab9jd8FxJ/McGYWqlVshH6n8Bs= + diff --git a/README.md b/README.md index dbaeeeadcd..76933355bf 100644 --- a/README.md +++ b/README.md @@ -467,9 +467,9 @@ To run `ktlint` - right-click on `ktlint/src/main/kotlin/com/pinterest/ktlint/Ma #### Access to the latest `master` snapshot -Whenever a commit is added to the `master` branch `0.0.0-SNAPSHOT` is automatically uploaded to [Sonatype's snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/com/pinterest/ktlint/). +Whenever a commit is added to the `master` branch a snapshot build is automatically uploaded to [Sonatype's snapshots repository](https://oss.sonatype.org/content/repositories/snapshots/com/pinterest/ktlint/). If you are eager to try upcoming changes (that might or might not be included in the next stable release) you can do -so by changing version of ktlint to `0.0.0-SNAPSHOT` + adding a repo: +so by changing version of ktlint to `-SNAPSHOT` + adding a repo: ##### Maven