From ff08c841f15e45fb50a257882f030e9b1dffefaa Mon Sep 17 00:00:00 2001 From: Jesse Wilson Date: Sat, 9 Aug 2014 12:13:20 -0400 Subject: [PATCH] Basic project structure. --- .gitignore | 24 ++++++++ CHANGELOG.md | 10 ++++ CONTRIBUTING.md | 17 ++++++ LICENSE => LICENSE.txt | 7 ++- README.md | 5 +- checkstyle.xml | 131 +++++++++++++++++++++++++++++++++++++++++ deploy_javadoc.sh | 41 +++++++++++++ moshi/pom.xml | 27 +++++++++ pom.xml | 90 ++++++++++++++++++++++++++++ 9 files changed, 348 insertions(+), 4 deletions(-) create mode 100644 .gitignore create mode 100644 CHANGELOG.md create mode 100644 CONTRIBUTING.md rename LICENSE => LICENSE.txt (99%) create mode 100644 checkstyle.xml create mode 100755 deploy_javadoc.sh create mode 100644 moshi/pom.xml create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..226a3f3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +.classpath +.project +.settings +eclipsebin + +bin +gen +build +out +lib + +target +pom.xml.* +release.properties + +.idea +*.iml +*.ipr +*.iws +classes + +obj + +.DS_Store diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..1310bc9 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +Change Log +========== + +## Version 0.1.0 + +_2014-08-09_ + + * Initial code creation. + * Imported JsonReader and JsonWriter from Gson. + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..54f63be --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,17 @@ +Contributing +============ + +If you would like to contribute code to Moshi you can do so through GitHub by +forking the repository and sending a pull request. + +When submitting code, please make every effort to follow existing conventions +and style in order to keep the code as readable as possible. Please also make +sure your code compiles by running `mvn clean verify`. Checkstyle failures +during compilation indicate errors in your style and can be viewed in the +`checkstyle-result.xml` file. + +Before your code can be accepted into the project you must also sign the +[Individual Contributor License Agreement (CLA)][1]. + + + [1]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1 diff --git a/LICENSE b/LICENSE.txt similarity index 99% rename from LICENSE rename to LICENSE.txt index 5c304d1..d645695 100644 --- a/LICENSE +++ b/LICENSE.txt @@ -1,4 +1,5 @@ -Apache License + + Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ @@ -178,7 +179,7 @@ Apache License APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +187,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index f7ef852..42e0415 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ -moshi +Moshi ===== + +A modern JSON library for Android and Java. + diff --git a/checkstyle.xml b/checkstyle.xml new file mode 100644 index 0000000..794af42 --- /dev/null +++ b/checkstyle.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/deploy_javadoc.sh b/deploy_javadoc.sh new file mode 100755 index 0000000..c0eab59 --- /dev/null +++ b/deploy_javadoc.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +set -ex + +REPO="git@github.com:square/moshi.git" +GROUP_ID="com.squareup.moshi" +ARTIFACT_ID="moshi" + +DIR=temp-clone + +# Delete any existing temporary website clone +rm -rf $DIR + +# Clone the current repo into temp folder +git clone $REPO $DIR + +# Move working directory into temp folder +cd $DIR + +# Checkout and track the gh-pages branch +git checkout -t origin/gh-pages + +# Delete everything +rm -rf * + +# Download the latest javadoc +curl -L "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=$GROUP_ID&a=$ARTIFACT_ID&v=LATEST&c=javadoc" > javadoc.zip +unzip javadoc.zip +rm javadoc.zip + +# Stage all files in git and create a commit +git add . +git add -u +git commit -m "Website at $(date)" + +# Push the new files up to GitHub +git push origin gh-pages + +# Delete our temp folder +cd .. +rm -rf $DIR diff --git a/moshi/pom.xml b/moshi/pom.xml new file mode 100644 index 0000000..dde3e73 --- /dev/null +++ b/moshi/pom.xml @@ -0,0 +1,27 @@ + + + + 4.0.0 + + + com.squareup.moshi + moshi-parent + 0.1-SNAPSHOT + + + moshi + Moshi + + + + com.squareup.okio + okio + 1.0.1 + + + junit + junit + test + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..0a21dfb --- /dev/null +++ b/pom.xml @@ -0,0 +1,90 @@ + + + + 4.0.0 + + + org.sonatype.oss + oss-parent + 7 + + + com.squareup.moshi + moshi-parent + 0.1-SNAPSHOT + pom + Moshi (Parent) + A modern JSON API for Android and Java + https://github.com/square/moshi + + + moshi + + + + UTF-8 + 1.6 + + + 1.0.1 + + + 4.11 + + + + https://github.com/square/moshi/ + scm:git:https://github.com/square/moshi.git + scm:git:git@github.com:square/moshi.git + HEAD + + + + GitHub Issues + https://github.com/square/moshi/issues + + + + + Apache 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + + + + + + + junit + junit + ${junit.version} + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.0 + + ${java.version} + ${java.version} + + + + + + + + org.apache.maven.plugins + maven-release-plugin + 2.5 + + true + + + + +