diff --git a/.buildscript/deploy_snapshot.sh b/.buildscript/deploy_snapshot.sh new file mode 100755 index 0000000..f7ccfac --- /dev/null +++ b/.buildscript/deploy_snapshot.sh @@ -0,0 +1,26 @@ +#!/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/ + +SLUG="square/moshi" +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..." + mvn clean source:jar javadoc:jar deploy --settings=".buildscript/settings.xml" -Dmaven.test.skip=true + echo "Snapshot deployed!" +fi diff --git a/.buildscript/settings.xml b/.buildscript/settings.xml new file mode 100644 index 0000000..91f444b --- /dev/null +++ b/.buildscript/settings.xml @@ -0,0 +1,9 @@ + + + + sonatype-nexus-snapshots + ${env.CI_DEPLOY_USERNAME} + ${env.CI_DEPLOY_PASSWORD} + + + diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cfff9f3 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,26 @@ +language: java + +jdk: + - oraclejdk7 + - oraclejdk8 + +after_success: + - .buildscript/deploy_snapshot.sh + +env: + global: + - secure: "TODO get me!" + - secure: "TODO get me!" + +branches: + except: + - gh-pages + +notifications: + email: false + +sudo: false + +cache: + directories: + - $HOME/.m2 diff --git a/CHANGELOG.md b/CHANGELOG.md index 1310bc9..9dd212e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,7 +3,7 @@ Change Log ## Version 0.1.0 -_2014-08-09_ +_In Development_ * Initial code creation. * Imported JsonReader and JsonWriter from Gson. diff --git a/README.md b/README.md index 42e0415..14956a4 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,30 @@ Moshi A modern JSON library for Android and Java. + + +Download +-------- + +Moshi is currently under development. + +Snapshots of the development version are available in [Sonatype's `snapshots` repository][snap]. + + + +License +-------- + + Copyright 2015 Square, Inc. + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License.