diff --git a/.buildscript/deploy_snapshot.sh b/.buildscript/deploy_snapshot.sh new file mode 100755 index 0000000..5a8ce63 --- /dev/null +++ b/.buildscript/deploy_snapshot.sh @@ -0,0 +1,27 @@ +#!/bin/bash +# +# Deploy a jar, source jar, and javadoc jar to Sonatype's snapshot repo. +# +# Adapted from https://coderwall.com/p/9b_lfq and +# http://benlimmer.com/2013/12/26/automatically-publish-javadoc-to-gh-pages-with-travis-ci/ and +# https://github.com/JakeWharton/RxBinding/blob/master/.buildscript/deploy_snapshot.sh + +SLUG="vanniktech/gradle-android-javadoc-plugin" +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..." + ./gradlew clean uploadArchives + echo "Snapshot deployed!" +fi \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 8938a0c..15e121a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,2 +1,15 @@ language: groovy -script: ./gradlew clean build \ No newline at end of file + +env: + global: + - secure: "bhL77OtWYWgz+wL/PhLMp72B5d37eIxr6F5XlVPjDkXqGw3F2Axf4UlKMYYu3UpjhBxIyeHiSU6bRLo4bwMa7B0/nBnUYdDgPO2s3a1/2z3kesxm83iVA+FSE4LWVoQi2+c2MEsnzniAtKsxM1svdaqTcP7XQ0h8J8/oKikpPdWiK+G/RYYWSr6bFwAuB+3VSGeRXwncY6aUMBoruCziLRhbKDoEwTym72f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PlUgFjRT8SWCrZq9Qk/belXEF1ZS3HyZGbC5AAeNyT62SxrreUX/Vzb3ces=" + +script: ./gradlew clean build + +after_success: + - .buildscript/deploy_snapshot.sh + +cache: + directories: + - $HOME/.gradle \ No newline at end of file diff --git a/README.md b/README.md index 7cd088d..3aa7cd1 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,14 @@ apply plugin: 'com.vanniktech.android.javadoc' Information: [This plugin is also available on Gradle plugins](https://plugins.gradle.org/plugin/com.vanniktech.android.javadoc) +### Snapshots + +Can be found [here](https://oss.sonatype.org/#nexus-search;quick~gradle-android-javadoc-plugin). Current one is: + +```groovy +classpath 'com.vanniktech:gradle-android-javadoc-plugin:0.2.2-SNAPSHOT' +``` + ## Get Javadoc ```groovy diff --git a/gradle.properties b/gradle.properties index 8ae8ac6..6523421 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ GROUP=com.vanniktech -VERSION_NAME=0.2.1 +VERSION_NAME=0.2.2-SNAPSHOT POM_ARTIFACT_ID=gradle-android-javadoc-plugin POM_NAME=Gradle Android Javadoc Plugin