Permalink
Browse files

Merge pull request #9 from square/project-cleanup

General project clean-up and tweaks.
  • Loading branch information...
swankjesse committed Jul 28, 2012
2 parents 28518d7 + 08b1d7f commit 3608deb867c65e4c1eb0f7d0ceb64249d7eac893
Showing with 370 additions and 141 deletions.
  1. +21 −5 .gitignore
  2. +54 −1 README.md
  3. +120 −0 checkstyle.xml
  4. +22 −0 pom.xml
  5. +37 −37 src/main/java/com/squareup/okhttp/OkHttpConnection.java
  6. +1 −1 src/main/java/com/squareup/okhttp/OkHttpsConnection.java
  7. +19 −19 src/main/java/libcore/io/Base64.java
  8. +5 −5 src/main/java/libcore/io/DiskLruCache.java
  9. +2 −1 src/main/java/libcore/io/Streams.java
  10. +9 −9 src/main/java/libcore/net/MimeUtils.java
  11. +1 −1 src/main/java/libcore/net/http/AbstractHttpOutputStream.java
  12. +3 −0 src/main/java/libcore/net/http/HeaderParser.java
  13. +3 −0 src/main/java/libcore/net/http/HttpDate.java
  14. +1 −1 src/main/java/libcore/net/http/HttpEngine.java
  15. +7 −7 src/main/java/libcore/net/http/HttpTransport.java
  16. +2 −3 src/main/java/libcore/net/http/HttpURLConnectionImpl.java
  17. +2 −2 src/main/java/libcore/net/http/HttpsURLConnectionImpl.java
  18. +5 −4 src/main/java/libcore/net/http/RawHeaders.java
  19. +6 −6 src/main/java/libcore/net/http/RequestHeaders.java
  20. +16 −16 src/main/java/libcore/net/http/ResponseHeaders.java
  21. +5 −4 src/main/java/libcore/net/spdy/SpdyConnection.java
  22. +1 −1 src/main/java/libcore/net/spdy/SpdyServer.java
  23. +3 −0 src/main/java/libcore/net/spdy/Threads.java
  24. +2 −1 src/main/java/libcore/util/BasicLruCache.java
  25. +1 −1 src/main/java/libcore/util/Charsets.java
  26. +2 −2 src/main/java/libcore/util/CollectionUtils.java
  27. +2 −1 src/main/java/libcore/util/EmptyArray.java
  28. +14 −11 src/main/java/libcore/util/Libcore.java
  29. +2 −1 src/main/java/libcore/util/Objects.java
  30. +2 −1 src/main/java/libcore/util/SneakyThrow.java
View
@@ -1,6 +1,22 @@
-*.class
+.classpath
+.project
+.settings
+eclipsebin
-# Package Files #
-*.jar
-*.war
-*.ear
+bin
+gen
+build
+out
+lib
+
+target
+pom.xml.*
+release.properties
+
+.idea
+*.iml
+classes
+
+obj
+
+.DS_Store
View
@@ -1,4 +1,57 @@
okhttp
======
-An HTTP+SPDY client for Android and Java applications
+An HTTP+SPDY client for Android and Java applications.
+
+
+Download
+--------
+
+Downloadable .jars can be found on the [GitHub download page][1].
+
+You can also depend on the .jar through Maven:
+
+```xml
+<dependency>
+ <groupId>com.squareup</groupId>
+ <artifactId>okhttp</artifactId>
+ <version>(insert latest version)</version>
+</dependency>
+```
+
+
+Contributing
+------------
+
+If you would like to contribute code to OKHTTP 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)][2].
+
+
+License
+-------
+
+ 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.
+
+
+
+ [1]: http://github.com/square/okhttp/downloads
+ [2]: https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1
View
@@ -0,0 +1,120 @@
+<?xml version="1.0"?>
+<!DOCTYPE module PUBLIC
+ "-//Puppy Crawl//DTD Check Configuration 1.2//EN"
+ "http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
+
+<module name="Checker">
+ <module name="NewlineAtEndOfFile"/>
+ <module name="FileLength"/>
+ <module name="FileTabCharacter"/>
+
+ <!-- Trailing spaces -->
+ <module name="RegexpSingleline">
+ <property name="format" value="\s+$"/>
+ <property name="message" value="Line has trailing spaces."/>
+ </module>
+
+ <module name="TreeWalker">
+ <property name="cacheFile" value="${checkstyle.cache.file}"/>
+
+ <!-- Checks for Javadoc comments. -->
+ <!-- See http://checkstyle.sf.net/config_javadoc.html -->
+ <!--module name="JavadocMethod"/-->
+ <!--module name="JavadocType"/-->
+ <!--module name="JavadocVariable"/-->
+ <module name="JavadocStyle"/>
+
+
+ <!-- Checks for Naming Conventions. -->
+ <!-- See http://checkstyle.sf.net/config_naming.html -->
+ <module name="ConstantName"/>
+ <module name="LocalFinalVariableName"/>
+ <module name="LocalVariableName"/>
+ <module name="MemberName"/>
+ <module name="MethodName"/>
+ <module name="PackageName"/>
+ <module name="ParameterName"/>
+ <module name="StaticVariableName"/>
+ <module name="TypeName"/>
+
+
+ <!-- Checks for imports -->
+ <!-- See http://checkstyle.sf.net/config_import.html -->
+ <module name="AvoidStarImport"/>
+ <module name="IllegalImport"/> <!-- defaults to sun.* packages -->
+ <module name="RedundantImport"/>
+ <module name="UnusedImports"/>
+
+
+ <!-- Checks for Size Violations. -->
+ <!-- See http://checkstyle.sf.net/config_sizes.html -->
+ <module name="LineLength">
+ <property name="max" value="120"/>
+ </module>
+ <module name="MethodLength"/>
+ <module name="ParameterNumber"/>
+
+
+ <!-- Checks for whitespace -->
+ <!-- See http://checkstyle.sf.net/config_whitespace.html -->
+ <module name="GenericWhitespace"/>
+ <module name="EmptyForIteratorPad"/>
+ <module name="MethodParamPad"/>
+ <module name="NoWhitespaceAfter"/>
+ <module name="NoWhitespaceBefore"/>
+ <module name="OperatorWrap"/>
+ <module name="ParenPad"/>
+ <module name="TypecastParenPad"/>
+ <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAround"/>
+
+
+ <!-- Modifier Checks -->
+ <!-- See http://checkstyle.sf.net/config_modifiers.html -->
+ <!--module name="ModifierOrder"/-->
+ <module name="RedundantModifier"/>
+
+
+ <!-- Checks for blocks. You know, those {}'s -->
+ <!-- See http://checkstyle.sf.net/config_blocks.html -->
+ <module name="AvoidNestedBlocks"/>
+ <!--module name="EmptyBlock"/-->
+ <module name="LeftCurly"/>
+ <module name="NeedBraces"/>
+ <module name="RightCurly"/>
+
+
+ <!-- Checks for common coding problems -->
+ <!-- See http://checkstyle.sf.net/config_coding.html -->
+ <!--module name="AvoidInlineConditionals"/-->
+ <module name="CovariantEquals"/>
+ <module name="DoubleCheckedLocking"/>
+ <module name="EmptyStatement"/>
+ <module name="EqualsAvoidNull"/>
+ <module name="EqualsHashCode"/>
+ <!--module name="HiddenField"/-->
+ <module name="IllegalInstantiation"/>
+ <!--module name="InnerAssignment"/-->
+ <!--module name="MagicNumber"/-->
+ <!--module name="MissingSwitchDefault"/-->
+ <module name="RedundantThrows"/>
+ <module name="SimplifyBooleanExpression"/>
+ <module name="SimplifyBooleanReturn"/>
+
+ <!-- Checks for class design -->
+ <!-- See http://checkstyle.sf.net/config_design.html -->
+ <!--module name="DesignForExtension"/-->
+ <module name="FinalClass"/>
+ <module name="HideUtilityClassConstructor"/>
+ <module name="InterfaceIsType"/>
+ <!--s/module name="VisibilityModifier"/-->
+
+
+ <!-- Miscellaneous other checks. -->
+ <!-- See http://checkstyle.sf.net/config_misc.html -->
+ <module name="ArrayTypeStyle"/>
+ <!--module name="FinalParameters"/-->
+ <!--module name="TodoComment"/-->
+ <module name="UpperEll"/>
+ </module>
+</module>
View
22 pom.xml
@@ -96,6 +96,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>jarjar-maven-plugin</artifactId>
+ <version>1.5</version>
<executions>
<execution>
<phase>package</phase>
@@ -118,7 +119,9 @@
</executions>
</plugin>
<plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
+ <version>2.9</version>
<configuration>
<argLine>-Xbootclasspath/p:${settings.localRepository}/org/mortbay/jetty/npn/npn-boot/${npn.version}/npn-boot-${npn.version}.jar</argLine>
</configuration>
@@ -137,6 +140,7 @@
-->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
+ <version>1.1</version>
<executions>
<execution>
<id>enforce-java</id>
@@ -153,6 +157,24 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ <version>2.9.1</version>
+ <configuration>
+ <failsOnError>true</failsOnError>
+ <configLocation>checkstyle.xml</configLocation>
+ <excludes>**/OsConstants.java</excludes>
+ </configuration>
+ <executions>
+ <execution>
+ <phase>verify</phase>
+ <goals>
+ <goal>checkstyle</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
</project>
Oops, something went wrong.

0 comments on commit 3608deb

Please sign in to comment.