Skip to content

Commit

Permalink
Reorganize project for a final push toward 1.0.
Browse files Browse the repository at this point in the history
* Bump version to 1.0.0-SNAPSHOT.
* Conslidate 'http' and 'io' modules into a single 'retrofit' module.
* Remove native directory sync code and example.
* Renames 'examples' to 'samples'.
  • Loading branch information
JakeWharton committed Oct 29, 2012
1 parent 517b208 commit 06d449f
Show file tree
Hide file tree
Showing 52 changed files with 40 additions and 342 deletions.
10 changes: 0 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,3 @@ branches:

notifications:
email: false

before_install:
- wget http://dl.google.com/android/android-sdk_r20.0.3-linux.tgz
- tar -zxf android-sdk_r20.0.3-linux.tgz
- export ANDROID_HOME=~/builds/square/retrofit/android-sdk-linux
- wget http://dl.google.com/android/ndk/android-ndk-r8b-linux-x86.tar.bz2
- tar -jxf android-ndk-r8b-linux-x86.tar.bz2
- export ANDROID_NDK_HOME=~/builds/square/retrofit/android-ndk-r8b
- export PATH=${PATH}:${ANDROID_HOME}/tools:${ANDROID_HOME}/platform-tools:${ANDROID_NDK_HOME}
- android update sdk --filter 1,3 --no-ui --force
34 changes: 16 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
Retrofit
========

Reusable Java and Android code from Square, Inc.
Type-safe REST client for Android and Java by Square, Inc.

Modules:

* http - Abstracts away the messy logic of making network calls (depends on 'io').
* io - Utility classes for doing low-level java I/O.
* sync - Directory write synchronization.


Http Usage
----------
Usage
-----

Create an interface for your API. You can create as many of these interfaces as you like. For
each interface you create, calling `RestAdapter.create(MyInterface.class)` will create an
Expand Down Expand Up @@ -60,16 +54,20 @@ behavior of GET/DELETE, where path parameters are excluded from the query string



Compilation
-----------

Retrofit is built using Maven and there is a very minimal amount of setup required for compilation.
License
=======

Copyright 2012 Square, Inc.

Two environment variables are required which point to your Android SDK and native Android SDK. A common
place to put these is in a `.bash_profile` file in your home directory.
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

export ANDROID_HOME=~/dev/android-sdk
export ANDROID_NDK_HOME=~/dev/android-ndk
http://www.apache.org/licenses/LICENSE-2.0

With these two environment variables loaded you can compile the modules and sample application by running
`mvn clean verify`. Each module's built artifact will be in its respective `target/` folder.
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.
15 changes: 0 additions & 15 deletions examples/directory-sync/AndroidManifest.xml

This file was deleted.

45 changes: 0 additions & 45 deletions examples/directory-sync/pom.xml

This file was deleted.

35 changes: 0 additions & 35 deletions examples/directory-sync/src/main/java/retrofit/test_app/Main.java

This file was deleted.

44 changes: 0 additions & 44 deletions io/pom.xml

This file was deleted.

17 changes: 7 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,18 @@
<version>7</version>
</parent>

<groupId>com.squareup</groupId>
<artifactId>retrofit</artifactId>
<version>0.8.0-SNAPSHOT</version>
<groupId>com.squareup.retrofit</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Retrofit</name>
<description>Reusable Java and Android code from Square, Inc. for simplified I/O, HTTP, and more.</description>
<name>Retrofit (Parent)</name>
<description>Type-safe REST client for Android and Java by Square, Inc.</description>
<url>http://github.com/square/retrofit/</url>

<modules>
<module>examples</module>
<module>http</module>
<module>io</module>
<module>sync</module>
<module>sync-native</module>
<module>retrofit</module>
<module>samples</module>
</modules>

<properties>
Expand Down
15 changes: 5 additions & 10 deletions http/pom.xml → retrofit/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,16 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.squareup</groupId>
<artifactId>retrofit</artifactId>
<version>0.8.0-SNAPSHOT</version>
<groupId>com.squareup.retrofit</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>retrofit-http</artifactId>
<name>HTTP</name>
<artifactId>retrofit</artifactId>
<name>Retrofit</name>

<dependencies>
<dependency>
<groupId>com.squareup</groupId>
<artifactId>retrofit-io</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions examples/pom.xml → samples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.squareup</groupId>
<artifactId>retrofit</artifactId>
<version>0.8.0-SNAPSHOT</version>
<groupId>com.squareup.retrofit</groupId>
<artifactId>parent</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>retrofit-examples</artifactId>
<name>Examples</name>
<artifactId>samples</artifactId>
<name>Samples</name>
<packaging>pom</packaging>

<modules>
<module>directory-sync</module>
<module>twitter-client</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.squareup</groupId>
<artifactId>retrofit-examples</artifactId>
<version>0.8.0-SNAPSHOT</version>
<groupId>com.squareup.retrofit</groupId>
<artifactId>samples</artifactId>
<version>1.0.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>retrofit-example-twitter-client</artifactId>
<artifactId>sample-twitter-client</artifactId>
<packaging>jar</packaging>
<name>Example: Twitter Client</name>
<name>Sample: Twitter Client</name>

<dependencies>
<dependency>
Expand All @@ -26,8 +26,8 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.squareup</groupId>
<artifactId>retrofit-http</artifactId>
<groupId>com.squareup.retrofit</groupId>
<artifactId>retrofit</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
8 changes: 0 additions & 8 deletions sync-native/jni/Android.mk

This file was deleted.

30 changes: 0 additions & 30 deletions sync-native/jni/retrofit.c

This file was deleted.

27 changes: 0 additions & 27 deletions sync-native/pom.xml

This file was deleted.

Loading

0 comments on commit 06d449f

Please sign in to comment.