Skip to content
This repository has been archived by the owner on Mar 14, 2022. It is now read-only.

Commit

Permalink
Merge pull request #5 from vanniktech/master_auto_snapshot_deploy
Browse files Browse the repository at this point in the history
Add auto snapshot deployment. Fixes #3
  • Loading branch information
vanniktech committed Nov 21, 2015
2 parents f043584 + 0021777 commit 3190ee2
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .buildscript/deploy_snapshot.sh
Original file line number Diff line number Diff line change
@@ -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
15 changes: 14 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
language: groovy
script: ./gradlew clean build

env:
global:
- secure: "bhL77OtWYWgz+wL/PhLMp72B5d37eIxr6F5XlVPjDkXqGw3F2Axf4UlKMYYu3UpjhBxIyeHiSU6bRLo4bwMa7B0/nBnUYdDgPO2s3a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x9VrtXv4NCobvdQbbdGSnGrUwOOIm1slR5+kMyfnYIVcS4wW98iyn4L7QlfypynV1Wh/0TLMbI7jy34Jrteg44v/7K+0159v6W54Dc19GnEeIRp3TWeEo6OHpfUedPlUgFjRT8SWCrZq9Qk/belXEF1ZS3HyZGbC5AAeNyT62SxrreUX/Vzb3ces="

script: ./gradlew clean build

after_success:
- .buildscript/deploy_snapshot.sh

cache:
directories:
- $HOME/.gradle
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 3190ee2

Please sign in to comment.