-
-
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
deleted file mode 100644
index 3b00020308..0000000000
--- a/.idea/uiDesigner.xml
+++ /dev/null
@@ -1,125 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 275077f825..0000000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/LICENSE.txt b/LICENSE.txt
new file mode 100644
index 0000000000..d645695673
--- /dev/null
+++ b/LICENSE.txt
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ 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 "[]"
+ 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
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ 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.
+ 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.
diff --git a/README.markdown b/README.markdown
deleted file mode 100644
index 0789716ac6..0000000000
--- a/README.markdown
+++ /dev/null
@@ -1,53 +0,0 @@
-# Retrofit
-
-Reusable Java and Android code from Square, Inc.
-
-Modules:
-
-+ IO: Utility classes for doing low-level java I/O.
-+ Http: Abstracts away the messy logic of making network calls (depends on IO).
-+ Core: Some interfaces and utilities used by the other retrofit modules.
-+ Android: Contains two Android-specific utility classes: ShakeDetector (for detecting device
-shakes) and QueueFile (for storing a queue on the android file-system).
-
-Note that IntelliJ will complain about compilation errors until you run `ant` (to download all the
-dependencies). This command also generates the .jar files that you'll want to include in your
-application.
-
-
-## Http 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.service(MyInterface.class)` will create an
-instance of that API handler, which you can then store and use throughout your application. An
-example interface:
-
- public interface DummyService {
- // Produces a url like "foo/bar?id=idValue".
- @GET("foo/bar")
- void normalGet(@Named("id") String id, Callback callback);
-
- // Produces a url like "foo/idValue/bar?category=categoryValue".
- @GET("foo/{id}/bar")
- void getWithPathParam(@Named("id") String id, @Named("category") String category, Callback callback);
-
- // Produces a url like "foo/bar/idValue" and body like "id=idValue&body=bodyValue".
- @POST("foo/bar/{id}")
- void normalPost(@Named("id") String id, @Named("body") String body, Callback callback);
-
- // Produces a url like "foo/bar/idValue" and body generated by MyJsonObj.
- @POST("foo/bar/{id}")
- void singleEntityPost(@SingleEntity MyJsonObj card, @Named("id") String id, Callback callback);
- }
-
-Note that each method _must_ have a Callback object at the end of the parameter list. This is how
-your application will handle the results of your network calls: errors and successful responses are
-both handled by the Callback interface.
-
-If you want to use the @SingleEntity method of specifying request body (see singleEntityPost above),
-your MyJsonObject will need to implement TypedBytes. For convenience, you can extend
-\GsonRequestEntity if you're just trying to send a JSON string in the request body.
-
-Also worth noting: for POST/PUT requests using default form encoding for the request entity (see
-normalPost), any path parameters are also included in the request body. This is different from the
-behavior of GET/DELETE, where path parameters are excluded from the query string.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000000..2440a2ee1f
--- /dev/null
+++ b/README.md
@@ -0,0 +1,67 @@
+Retrofit
+========
+
+Reusable Java and Android code from Square, Inc.
+
+Modules:
+
+ * IO - Utility classes for doing low-level java I/O.
+ * HTTP - Abstracts away the messy logic of making network calls (depends on IO).
+ * Core - Some interfaces and utilities used by the other retrofit modules.
+ * Android - Contains two Android-specific utility classes: `ShakeDetector` (for detecting device
+ shakes) and `QueueFile` (for storing a queue on the android file-system).
+
+
+Http 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.service(MyInterface.class)` will create an
+instance of that API handler, which you can then store and use throughout your application. An
+example interface:
+
+ public interface DummyService {
+ // Produces a url like "foo/bar?id=idValue".
+ @GET("foo/bar")
+ void normalGet(@Named("id") String id, Callback callback);
+
+ // Produces a url like "foo/idValue/bar?category=categoryValue".
+ @GET("foo/{id}/bar")
+ void getWithPathParam(@Named("id") String id, @Named("category") String category, Callback callback);
+
+ // Produces a url like "foo/bar/idValue" and body like "id=idValue&body=bodyValue".
+ @POST("foo/bar/{id}")
+ void normalPost(@Named("id") String id, @Named("body") String body, Callback callback);
+
+ // Produces a url like "foo/bar/idValue" and body generated by MyJsonObj.
+ @POST("foo/bar/{id}")
+ void singleEntityPost(@SingleEntity MyJsonObj card, @Named("id") String id, Callback callback);
+ }
+
+Note that each method _must_ have a `Callback` object at the end of the parameter list. This is how
+your application will handle the results of your network calls: errors and successful responses are
+both handled by the `Callback` interface.
+
+If you want to use the `@SingleEntity` method of specifying request body (see `singleEntityPost` above),
+your `MyJsonObject` will need to implement `TypedBytes`. For convenience, you can extend
+`GsonRequestEntity` if you're just trying to send a JSON string in the request body.
+
+Also worth noting: for POST/PUT requests using default form encoding for the request entity (see
+normalPost), any path parameters are also included in the request body. This is different from the
+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.
+
+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.
+
+ export ANDROID_HOME=~/dev/android-sdk
+ export ANDROID_NDK_HOME=~/dev/android-ndk
+
+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.
diff --git a/modules/android/jni/Android.mk b/android-native/jni/Android.mk
similarity index 72%
rename from modules/android/jni/Android.mk
rename to android-native/jni/Android.mk
index 602661c876..f9e9a1d4e4 100644
--- a/modules/android/jni/Android.mk
+++ b/android-native/jni/Android.mk
@@ -2,7 +2,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE := retrofit
+LOCAL_MODULE := retrofit-android-native
LOCAL_SRC_FILES := retrofit.c
include $(BUILD_SHARED_LIBRARY)
\ No newline at end of file
diff --git a/modules/android/jni/retrofit.c b/android-native/jni/retrofit.c
similarity index 100%
rename from modules/android/jni/retrofit.c
rename to android-native/jni/retrofit.c
diff --git a/android-native/pom.xml b/android-native/pom.xml
new file mode 100644
index 0000000000..e332479ca2
--- /dev/null
+++ b/android-native/pom.xml
@@ -0,0 +1,28 @@
+
+
+
+ 4.0.0
+
+
+ com.squareup
+ retrofit
+ 1.0.0-SNAPSHOT
+ ../pom.xml
+
+
+ com.squareup
+ retrofit-android-native
+ so
+ Retrofit Android (Native)
+
+
+
+
+ com.jayway.maven.plugins.android.generation2
+ android-maven-plugin
+ true
+
+
+
+
\ No newline at end of file
diff --git a/android/pom.xml b/android/pom.xml
new file mode 100644
index 0000000000..5208087eac
--- /dev/null
+++ b/android/pom.xml
@@ -0,0 +1,32 @@
+
+
+
+ 4.0.0
+
+
+ com.squareup
+ retrofit
+ 1.0.0-SNAPSHOT
+ ../pom.xml
+
+
+ com.squareup
+ retrofit-android
+ jar
+ Retrofit Android
+
+
+
+ com.google.android
+ android
+ provided
+
+
+
+ junit
+ junit
+ test
+
+
+
\ No newline at end of file
diff --git a/modules/android/src/retrofit/android/ShakeDetector.java b/android/src/main/java/retrofit/android/ShakeDetector.java
similarity index 100%
rename from modules/android/src/retrofit/android/ShakeDetector.java
rename to android/src/main/java/retrofit/android/ShakeDetector.java
diff --git a/modules/android/src/retrofit/io/QueueFile.java b/android/src/main/java/retrofit/io/QueueFile.java
similarity index 99%
rename from modules/android/src/retrofit/io/QueueFile.java
rename to android/src/main/java/retrofit/io/QueueFile.java
index d588dd39e6..ebfe8eae71 100644
--- a/modules/android/src/retrofit/io/QueueFile.java
+++ b/android/src/main/java/retrofit/io/QueueFile.java
@@ -478,7 +478,7 @@ public synchronized int size() {
/**
* Removes the eldest element.
*
- * @throw NoSuchElementException if the queue is empty
+ * @throws NoSuchElementException if the queue is empty
*/
public synchronized void remove() throws IOException {
if (isEmpty()) throw new NoSuchElementException();
diff --git a/modules/android/src-tests/retrofit/android/ShakeDetectorTest.java b/android/src/test/java/retrofit/android/ShakeDetectorTest.java
similarity index 89%
rename from modules/android/src-tests/retrofit/android/ShakeDetectorTest.java
rename to android/src/test/java/retrofit/android/ShakeDetectorTest.java
index 9a0499ce6b..c6b5075f3e 100644
--- a/modules/android/src-tests/retrofit/android/ShakeDetectorTest.java
+++ b/android/src/test/java/retrofit/android/ShakeDetectorTest.java
@@ -1,18 +1,25 @@
// Copyright 2010 Square, Inc.
package retrofit.android;
-import junit.framework.TestCase;
import java.util.List;
-/** @author Eric Burke (eric@squareup.com) */
-public class ShakeDetectorTest extends TestCase {
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * @author Eric Burke (eric@squareup.com)
+ */
+public class ShakeDetectorTest {
public void testInitialShaking() {
ShakeDetector.SampleQueue q = new ShakeDetector.SampleQueue();
assertFalse("shaking", q.isShaking());
}
- /** Tests LG Ally sample rate. */
+ /**
+ * Tests LG Ally sample rate.
+ */
public void testShakingSampleCount3() {
ShakeDetector.SampleQueue q = new ShakeDetector.SampleQueue();
diff --git a/modules/android/src-tests/retrofit/io/QueueFileTest.java b/android/src/test/java/retrofit/io/QueueFileTest.java
similarity index 95%
rename from modules/android/src-tests/retrofit/io/QueueFileTest.java
rename to android/src/test/java/retrofit/io/QueueFileTest.java
index d912334f8c..13c987991d 100644
--- a/modules/android/src-tests/retrofit/io/QueueFileTest.java
+++ b/android/src/test/java/retrofit/io/QueueFileTest.java
@@ -1,17 +1,20 @@
// Copyright 2010 Square, Inc.
package retrofit.io;
+import org.junit.After;
+import org.junit.Before;
+
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.RandomAccessFile;
-import java.util.Arrays;
import java.util.LinkedList;
import java.util.Queue;
import java.util.logging.Logger;
-import junit.framework.ComparisonFailure;
-import junit.framework.TestCase;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
/**
* Tests for QueueFile.
@@ -19,7 +22,7 @@
* @author Bob Lee (bob@squareup.com)
*/
@SuppressWarnings({"ResultOfMethodCallIgnored"})
-public class QueueFileTest extends TestCase {
+public class QueueFileTest {
private static final Logger logger =
Logger.getLogger(QueueFileTest.class.getName());
@@ -41,12 +44,12 @@ public class QueueFileTest extends TestCase {
private File file;
- @Override protected void setUp() throws Exception {
+ @Before protected void setUp() throws Exception {
file = File.createTempFile("test.queue", null);
file.delete();
}
- @Override protected void tearDown() throws Exception {
+ @After protected void tearDown() throws Exception {
file.delete();
}
@@ -283,14 +286,6 @@ public void testForEach() throws IOException {
assertEquals(2, iteration[0]);
}
- /** Compares two byte[]s for equality. */
- private static void assertEquals(byte[] expected, byte[] actual) {
- if (!Arrays.equals(expected, actual)) {
- throw new ComparisonFailure(null, Arrays.toString(expected),
- Arrays.toString(actual));
- }
- }
-
/**
* Exercise a bug where wrapped elements were getting corrupted when the
* QueueFile was forced to expand in size and a portion of the final Element
diff --git a/build-macros.xml b/build-macros.xml
deleted file mode 100644
index 4529df128d..0000000000
--- a/build-macros.xml
+++ /dev/null
@@ -1,88 +0,0 @@
-
-
-
-
-
-
-
- Import this build file into the main build.xml.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/build.xml b/build.xml
deleted file mode 100644
index 585ebfef80..0000000000
--- a/build.xml
+++ /dev/null
@@ -1,215 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/core/pom.xml b/core/pom.xml
new file mode 100644
index 0000000000..610cd9ebda
--- /dev/null
+++ b/core/pom.xml
@@ -0,0 +1,26 @@
+
+
+
+ 4.0.0
+
+
+ com.squareup
+ retrofit
+ 1.0.0-SNAPSHOT
+ ../pom.xml
+
+
+ com.squareup
+ retrofit-core
+ jar
+ Retrofit Core
+
+
+
+ junit
+ junit
+ test
+
+
+
\ No newline at end of file
diff --git a/modules/core/src/retrofit/core/Callback.java b/core/src/main/java/retrofit/core/Callback.java
similarity index 100%
rename from modules/core/src/retrofit/core/Callback.java
rename to core/src/main/java/retrofit/core/Callback.java
diff --git a/modules/core/src/retrofit/core/MainThread.java b/core/src/main/java/retrofit/core/MainThread.java
similarity index 100%
rename from modules/core/src/retrofit/core/MainThread.java
rename to core/src/main/java/retrofit/core/MainThread.java
diff --git a/modules/core/src/retrofit/core/ProgressListener.java b/core/src/main/java/retrofit/core/ProgressListener.java
similarity index 100%
rename from modules/core/src/retrofit/core/ProgressListener.java
rename to core/src/main/java/retrofit/core/ProgressListener.java
diff --git a/modules/core/src/retrofit/core/internal/Objects.java b/core/src/main/java/retrofit/core/internal/Objects.java
similarity index 100%
rename from modules/core/src/retrofit/core/internal/Objects.java
rename to core/src/main/java/retrofit/core/internal/Objects.java
diff --git a/modules/core/src-tests/retrofit/core/internal/ObjectsTest.java b/core/src/test/java/retrofit/core/internal/ObjectsTest.java
similarity index 67%
rename from modules/core/src-tests/retrofit/core/internal/ObjectsTest.java
rename to core/src/test/java/retrofit/core/internal/ObjectsTest.java
index a6be0c4294..f92edfd59d 100644
--- a/modules/core/src-tests/retrofit/core/internal/ObjectsTest.java
+++ b/core/src/test/java/retrofit/core/internal/ObjectsTest.java
@@ -1,10 +1,13 @@
// Copyright 2010 Square, Inc.
package retrofit.core.internal;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
-/** @author Eric Burke (eric@squareup.com) */
-public class ObjectsTest extends TestCase {
+/**
+ * @author Eric Burke (eric@squareup.com)
+ */
+public class ObjectsTest {
public void testNonNull() {
Objects.nonNull(10, "whatever");
try {
diff --git a/http/pom.xml b/http/pom.xml
new file mode 100644
index 0000000000..7e28a0678f
--- /dev/null
+++ b/http/pom.xml
@@ -0,0 +1,81 @@
+
+
+
+ 4.0.0
+
+
+ com.squareup
+ retrofit
+ 1.0.0-SNAPSHOT
+ ../pom.xml
+
+
+ com.squareup
+ retrofit-http
+ jar
+ Retrofit HTTP
+
+
+
+ com.squareup
+ retrofit-io
+ ${project.version}
+
+
+ com.google.inject
+ guice
+
+
+ com.google.code.gson
+ gson
+
+
+ org.apache.httpcomponents
+ httpclient
+
+
+ org.apache.httpcomponents
+ httpmime
+
+
+
+ junit
+ junit
+ test
+
+
+ org.easymock
+ easymock
+ test
+
+
+
+
+
+
+ org.sonatype.plugins
+ jarjar-maven-plugin
+
+
+ package
+
+ jarjar
+
+
+
+ com.google.code.gson:gson
+
+
+
+ com.google.gson.**
+ retrofit.internal.gson.@1
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/http/src/retrofit/http/CallbackResponseHandler.java b/http/src/main/java/retrofit/http/CallbackResponseHandler.java
similarity index 99%
rename from modules/http/src/retrofit/http/CallbackResponseHandler.java
rename to http/src/main/java/retrofit/http/CallbackResponseHandler.java
index 3717b0045d..025569ea43 100644
--- a/modules/http/src/retrofit/http/CallbackResponseHandler.java
+++ b/http/src/main/java/retrofit/http/CallbackResponseHandler.java
@@ -5,13 +5,13 @@
import java.util.logging.Level;
import java.util.logging.Logger;
+import com.google.gson.Gson;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.StatusLine;
import org.apache.http.client.ResponseHandler;
import org.apache.http.entity.BufferedHttpEntity;
import retrofit.core.Callback;
-import retrofit.internal.gson.Gson;
/**
* Support for response handlers that invoke {@link Callback}.
@@ -30,7 +30,7 @@ public abstract class CallbackResponseHandler
private static final int GATEWAY_TIMEOUT = 504;
private final Callback callback;
-
+
private final Gson gson;
protected CallbackResponseHandler(Gson gson, Callback callback) {
diff --git a/modules/http/src/retrofit/http/DELETE.java b/http/src/main/java/retrofit/http/DELETE.java
similarity index 100%
rename from modules/http/src/retrofit/http/DELETE.java
rename to http/src/main/java/retrofit/http/DELETE.java
diff --git a/modules/http/src/retrofit/http/Fetcher.java b/http/src/main/java/retrofit/http/Fetcher.java
similarity index 99%
rename from modules/http/src/retrofit/http/Fetcher.java
rename to http/src/main/java/retrofit/http/Fetcher.java
index 9cb7616d1c..1b19673b67 100644
--- a/modules/http/src/retrofit/http/Fetcher.java
+++ b/http/src/main/java/retrofit/http/Fetcher.java
@@ -1,6 +1,7 @@
// Copyright 2010 Square, Inc.
package retrofit.http;
+import com.google.gson.Gson;
import com.google.inject.Inject;
import com.google.inject.Provider;
import java.io.IOException;
@@ -14,7 +15,6 @@
import retrofit.core.Callback;
import retrofit.core.MainThread;
import retrofit.core.ProgressListener;
-import retrofit.internal.gson.Gson;
import retrofit.io.ByteSink;
import static retrofit.core.internal.Objects.nonNull;
diff --git a/modules/http/src/retrofit/http/GET.java b/http/src/main/java/retrofit/http/GET.java
similarity index 100%
rename from modules/http/src/retrofit/http/GET.java
rename to http/src/main/java/retrofit/http/GET.java
diff --git a/modules/http/src/retrofit/http/GsonResponseHandler.java b/http/src/main/java/retrofit/http/GsonResponseHandler.java
similarity index 94%
rename from modules/http/src/retrofit/http/GsonResponseHandler.java
rename to http/src/main/java/retrofit/http/GsonResponseHandler.java
index 4614041799..cea1c530bc 100644
--- a/modules/http/src/retrofit/http/GsonResponseHandler.java
+++ b/http/src/main/java/retrofit/http/GsonResponseHandler.java
@@ -1,9 +1,9 @@
package retrofit.http;
+import com.google.gson.Gson;
+import com.google.gson.JsonParseException;
import org.apache.http.HttpEntity;
import retrofit.core.Callback;
-import retrofit.internal.gson.Gson;
-import retrofit.internal.gson.JsonParseException;
import java.io.IOException;
import java.io.InputStreamReader;
diff --git a/modules/http/src/retrofit/http/Headers.java b/http/src/main/java/retrofit/http/Headers.java
similarity index 100%
rename from modules/http/src/retrofit/http/Headers.java
rename to http/src/main/java/retrofit/http/Headers.java
diff --git a/modules/http/src/retrofit/http/HttpClients.java b/http/src/main/java/retrofit/http/HttpClients.java
similarity index 100%
rename from modules/http/src/retrofit/http/HttpClients.java
rename to http/src/main/java/retrofit/http/HttpClients.java
diff --git a/modules/http/src/retrofit/http/HttpMethod.java b/http/src/main/java/retrofit/http/HttpMethod.java
similarity index 100%
rename from modules/http/src/retrofit/http/HttpMethod.java
rename to http/src/main/java/retrofit/http/HttpMethod.java
diff --git a/modules/http/src/retrofit/http/HttpMethodType.java b/http/src/main/java/retrofit/http/HttpMethodType.java
similarity index 100%
rename from modules/http/src/retrofit/http/HttpMethodType.java
rename to http/src/main/java/retrofit/http/HttpMethodType.java
diff --git a/modules/http/src/retrofit/http/HttpProfiler.java b/http/src/main/java/retrofit/http/HttpProfiler.java
similarity index 100%
rename from modules/http/src/retrofit/http/HttpProfiler.java
rename to http/src/main/java/retrofit/http/HttpProfiler.java
diff --git a/modules/http/src/retrofit/http/HttpRequestBuilder.java b/http/src/main/java/retrofit/http/HttpRequestBuilder.java
similarity index 99%
rename from modules/http/src/retrofit/http/HttpRequestBuilder.java
rename to http/src/main/java/retrofit/http/HttpRequestBuilder.java
index f3a83adb97..d8537543e2 100644
--- a/modules/http/src/retrofit/http/HttpRequestBuilder.java
+++ b/http/src/main/java/retrofit/http/HttpRequestBuilder.java
@@ -1,10 +1,10 @@
package retrofit.http;
+import com.google.gson.Gson;
import com.google.inject.name.Named;
import org.apache.http.NameValuePair;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.message.BasicNameValuePair;
-import retrofit.internal.gson.Gson;
import retrofit.io.MimeType;
import retrofit.io.TypedBytes;
diff --git a/modules/http/src/retrofit/http/POST.java b/http/src/main/java/retrofit/http/POST.java
similarity index 100%
rename from modules/http/src/retrofit/http/POST.java
rename to http/src/main/java/retrofit/http/POST.java
diff --git a/modules/http/src/retrofit/http/PUT.java b/http/src/main/java/retrofit/http/PUT.java
similarity index 100%
rename from modules/http/src/retrofit/http/PUT.java
rename to http/src/main/java/retrofit/http/PUT.java
diff --git a/modules/http/src/retrofit/http/QueryParam.java b/http/src/main/java/retrofit/http/QueryParam.java
similarity index 100%
rename from modules/http/src/retrofit/http/QueryParam.java
rename to http/src/main/java/retrofit/http/QueryParam.java
diff --git a/modules/http/src/retrofit/http/QueryParams.java b/http/src/main/java/retrofit/http/QueryParams.java
similarity index 100%
rename from modules/http/src/retrofit/http/QueryParams.java
rename to http/src/main/java/retrofit/http/QueryParams.java
diff --git a/modules/http/src/retrofit/http/RequestLine.java b/http/src/main/java/retrofit/http/RequestLine.java
similarity index 100%
rename from modules/http/src/retrofit/http/RequestLine.java
rename to http/src/main/java/retrofit/http/RequestLine.java
diff --git a/modules/http/src/retrofit/http/RestAdapter.java b/http/src/main/java/retrofit/http/RestAdapter.java
similarity index 99%
rename from modules/http/src/retrofit/http/RestAdapter.java
rename to http/src/main/java/retrofit/http/RestAdapter.java
index dc0117c553..25293c0d22 100644
--- a/modules/http/src/retrofit/http/RestAdapter.java
+++ b/http/src/main/java/retrofit/http/RestAdapter.java
@@ -1,5 +1,6 @@
package retrofit.http;
+import com.google.gson.Gson;
import com.google.inject.Binder;
import com.google.inject.Inject;
import com.google.inject.Module;
@@ -21,7 +22,6 @@
import org.apache.http.client.methods.HttpUriRequest;
import retrofit.core.Callback;
import retrofit.core.MainThread;
-import retrofit.internal.gson.Gson;
/**
* Converts Java method calls to Rest calls.
diff --git a/modules/http/src/retrofit/http/Server.java b/http/src/main/java/retrofit/http/Server.java
similarity index 100%
rename from modules/http/src/retrofit/http/Server.java
rename to http/src/main/java/retrofit/http/Server.java
diff --git a/modules/http/src/retrofit/http/ServerException.java b/http/src/main/java/retrofit/http/ServerException.java
similarity index 100%
rename from modules/http/src/retrofit/http/ServerException.java
rename to http/src/main/java/retrofit/http/ServerException.java
diff --git a/modules/http/src/retrofit/http/SingleEntity.java b/http/src/main/java/retrofit/http/SingleEntity.java
similarity index 100%
rename from modules/http/src/retrofit/http/SingleEntity.java
rename to http/src/main/java/retrofit/http/SingleEntity.java
diff --git a/modules/http/src/retrofit/http/TypedBytesBody.java b/http/src/main/java/retrofit/http/TypedBytesBody.java
similarity index 100%
rename from modules/http/src/retrofit/http/TypedBytesBody.java
rename to http/src/main/java/retrofit/http/TypedBytesBody.java
diff --git a/modules/http/src/retrofit/http/TypedBytesEntity.java b/http/src/main/java/retrofit/http/TypedBytesEntity.java
similarity index 100%
rename from modules/http/src/retrofit/http/TypedBytesEntity.java
rename to http/src/main/java/retrofit/http/TypedBytesEntity.java
diff --git a/modules/http/src/retrofit/http/UiCallback.java b/http/src/main/java/retrofit/http/UiCallback.java
similarity index 100%
rename from modules/http/src/retrofit/http/UiCallback.java
rename to http/src/main/java/retrofit/http/UiCallback.java
diff --git a/modules/http/src-tests/retrofit/http/DummyHttpClient.java b/http/src/test/java/retrofit/http/DummyHttpClient.java
similarity index 100%
rename from modules/http/src-tests/retrofit/http/DummyHttpClient.java
rename to http/src/test/java/retrofit/http/DummyHttpClient.java
diff --git a/modules/http/src-tests/retrofit/http/FetcherTest.java b/http/src/test/java/retrofit/http/FetcherTest.java
similarity index 99%
rename from modules/http/src-tests/retrofit/http/FetcherTest.java
rename to http/src/test/java/retrofit/http/FetcherTest.java
index 7b508e94d1..6a19824c4a 100644
--- a/modules/http/src-tests/retrofit/http/FetcherTest.java
+++ b/http/src/test/java/retrofit/http/FetcherTest.java
@@ -1,6 +1,7 @@
// Copyright 2010 Square, Inc.
package retrofit.http;
+import com.google.gson.Gson;
import com.google.inject.Provider;
import junit.framework.Assert;
import junit.framework.TestCase;
@@ -13,7 +14,6 @@
import retrofit.core.Callback;
import retrofit.core.MainThread;
import retrofit.core.ProgressListener;
-import retrofit.internal.gson.Gson;
import retrofit.io.ByteSink;
import java.io.ByteArrayOutputStream;
diff --git a/modules/http/src-tests/retrofit/http/HttpRequestBuilderTest.java b/http/src/test/java/retrofit/http/HttpRequestBuilderTest.java
similarity index 99%
rename from modules/http/src-tests/retrofit/http/HttpRequestBuilderTest.java
rename to http/src/test/java/retrofit/http/HttpRequestBuilderTest.java
index 27c12346e8..42dfe0fa5b 100644
--- a/modules/http/src-tests/retrofit/http/HttpRequestBuilderTest.java
+++ b/http/src/test/java/retrofit/http/HttpRequestBuilderTest.java
@@ -1,6 +1,7 @@
// Copyright 2011 Square, Inc.
package retrofit.http;
+import com.google.gson.Gson;
import com.google.inject.name.Named;
import java.io.ByteArrayOutputStream;
import java.lang.reflect.Method;
@@ -13,7 +14,6 @@
import org.apache.http.client.methods.HttpPut;
import org.apache.http.client.methods.HttpUriRequest;
import retrofit.core.Callback;
-import retrofit.internal.gson.Gson;
/** @author Eric Denman (edenman@squareup.com) */
public class HttpRequestBuilderTest extends TestCase {
diff --git a/modules/http/src-tests/retrofit/http/RestAdapterTest.java b/http/src/test/java/retrofit/http/RestAdapterTest.java
similarity index 99%
rename from modules/http/src-tests/retrofit/http/RestAdapterTest.java
rename to http/src/test/java/retrofit/http/RestAdapterTest.java
index 6abb921c1d..c90745ef00 100644
--- a/modules/http/src-tests/retrofit/http/RestAdapterTest.java
+++ b/http/src/test/java/retrofit/http/RestAdapterTest.java
@@ -1,5 +1,6 @@
package retrofit.http;
+import com.google.gson.Gson;
import com.google.inject.AbstractModule;
import com.google.inject.Guice;
import com.google.inject.Injector;
@@ -24,7 +25,6 @@
import org.junit.Before;
import retrofit.core.Callback;
import retrofit.core.MainThread;
-import retrofit.internal.gson.Gson;
import static org.easymock.EasyMock.capture;
import static org.easymock.EasyMock.createMock;
diff --git a/io/pom.xml b/io/pom.xml
new file mode 100644
index 0000000000..0bb59b30d1
--- /dev/null
+++ b/io/pom.xml
@@ -0,0 +1,49 @@
+
+
+
+ 4.0.0
+
+
+ com.squareup
+ retrofit
+ 1.0.0-SNAPSHOT
+ ../pom.xml
+
+
+ com.squareup
+ retrofit-io
+ jar
+ Retrofit I/O
+
+
+
+ com.squareup
+ retrofit-core
+ ${project.version}
+
+
+ com.squareup
+ retrofit-android-native
+ ${project.version}
+ so
+ armeabi
+
+
+
+ junit
+ junit
+ test
+
+
+
+
+
+
+ com.jayway.maven.plugins.android.generation2
+ android-maven-plugin
+ true
+
+
+
+
\ No newline at end of file
diff --git a/modules/io/src/retrofit/io/AbstractTypedBytes.java b/io/src/main/java/retrofit/io/AbstractTypedBytes.java
similarity index 100%
rename from modules/io/src/retrofit/io/AbstractTypedBytes.java
rename to io/src/main/java/retrofit/io/AbstractTypedBytes.java
diff --git a/modules/io/src/retrofit/io/ByteSink.java b/io/src/main/java/retrofit/io/ByteSink.java
similarity index 100%
rename from modules/io/src/retrofit/io/ByteSink.java
rename to io/src/main/java/retrofit/io/ByteSink.java
diff --git a/modules/io/src/retrofit/io/ByteSinks.java b/io/src/main/java/retrofit/io/ByteSinks.java
similarity index 100%
rename from modules/io/src/retrofit/io/ByteSinks.java
rename to io/src/main/java/retrofit/io/ByteSinks.java
diff --git a/modules/io/src/retrofit/io/Files.java b/io/src/main/java/retrofit/io/Files.java
similarity index 100%
rename from modules/io/src/retrofit/io/Files.java
rename to io/src/main/java/retrofit/io/Files.java
diff --git a/modules/io/src/retrofit/io/MimeType.java b/io/src/main/java/retrofit/io/MimeType.java
similarity index 100%
rename from modules/io/src/retrofit/io/MimeType.java
rename to io/src/main/java/retrofit/io/MimeType.java
diff --git a/modules/io/src/retrofit/io/TypedByteArray.java b/io/src/main/java/retrofit/io/TypedByteArray.java
similarity index 100%
rename from modules/io/src/retrofit/io/TypedByteArray.java
rename to io/src/main/java/retrofit/io/TypedByteArray.java
diff --git a/modules/io/src/retrofit/io/TypedBytes.java b/io/src/main/java/retrofit/io/TypedBytes.java
similarity index 100%
rename from modules/io/src/retrofit/io/TypedBytes.java
rename to io/src/main/java/retrofit/io/TypedBytes.java
diff --git a/modules/io/src/retrofit/io/TypedFile.java b/io/src/main/java/retrofit/io/TypedFile.java
similarity index 100%
rename from modules/io/src/retrofit/io/TypedFile.java
rename to io/src/main/java/retrofit/io/TypedFile.java
diff --git a/modules/io/src-tests/retrofit/io/FilesTest.java b/io/src/test/java/retrofit/io/FilesTest.java
similarity index 88%
rename from modules/io/src-tests/retrofit/io/FilesTest.java
rename to io/src/test/java/retrofit/io/FilesTest.java
index d657bffad8..814275544e 100644
--- a/modules/io/src-tests/retrofit/io/FilesTest.java
+++ b/io/src/test/java/retrofit/io/FilesTest.java
@@ -1,17 +1,18 @@
// Copyright 2011 Square, Inc.
package retrofit.io;
-import junit.framework.TestCase;
-
-import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.PrintWriter;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
/**
* @author Paul Hawke (psh@squareup.com)
*/
-public class FilesTest extends TestCase {
+public class FilesTest {
public void testDelete() throws Exception {
File tmpFile = File.createTempFile("prefix", ".tmp");
PrintWriter pw = new PrintWriter(new FileWriter(tmpFile));
diff --git a/modules/io/src-tests/retrofit/io/TypedByteArrayTest.java b/io/src/test/java/retrofit/io/TypedByteArrayTest.java
similarity index 74%
rename from modules/io/src-tests/retrofit/io/TypedByteArrayTest.java
rename to io/src/test/java/retrofit/io/TypedByteArrayTest.java
index 6d26b74e12..02b36eb998 100644
--- a/modules/io/src-tests/retrofit/io/TypedByteArrayTest.java
+++ b/io/src/test/java/retrofit/io/TypedByteArrayTest.java
@@ -1,10 +1,13 @@
// Copyright 2010 Square, Inc.
package retrofit.io;
-import junit.framework.TestCase;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
-/** @author Eric Burke (eric@squareup.com) */
-public class TypedByteArrayTest extends TestCase {
+/**
+ * @author Eric Burke (eric@squareup.com)
+ */
+public class TypedByteArrayTest {
public void testEquals() {
TypedByteArray a1 = new TypedByteArray(new byte[]{10, 20}, MimeType.GIF);
TypedByteArray a2 = new TypedByteArray(new byte[]{10, 20}, MimeType.GIF);
diff --git a/modules/io/src-tests/retrofit/io/TypedFileTest.java b/io/src/test/java/retrofit/io/TypedFileTest.java
similarity index 90%
rename from modules/io/src-tests/retrofit/io/TypedFileTest.java
rename to io/src/test/java/retrofit/io/TypedFileTest.java
index 90ed5c4e40..74dc84130a 100644
--- a/modules/io/src-tests/retrofit/io/TypedFileTest.java
+++ b/io/src/test/java/retrofit/io/TypedFileTest.java
@@ -1,14 +1,17 @@
// Copyright 2010 Square, Inc.
package retrofit.io;
-import junit.framework.TestCase;
-
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
-/** @author Eric Burke (eric@squareup.com) */
-public class TypedFileTest extends TestCase {
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+/**
+ * @author Eric Burke (eric@squareup.com)
+ */
+public class TypedFileTest {
public void testNotEquals() {
TypedFile a = new TypedFile(new File("a.png"), MimeType.PNG);
TypedFile b = new TypedFile(new File("b.png"), MimeType.PNG);
diff --git a/ivy-build.xml b/ivy-build.xml
deleted file mode 100644
index 52abc46063..0000000000
--- a/ivy-build.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ivy-settings.xml b/ivy-settings.xml
deleted file mode 100644
index df674bc604..0000000000
--- a/ivy-settings.xml
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/ivy.xml b/ivy.xml
deleted file mode 100644
index 40d4eb8f52..0000000000
--- a/ivy.xml
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/android/.gitignore b/modules/android/.gitignore
deleted file mode 100644
index 7a1bed4fec..0000000000
--- a/modules/android/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-android-ndk
-obj
diff --git a/modules/android/README.jni b/modules/android/README.jni
deleted file mode 100644
index 8dfd0de0c5..0000000000
--- a/modules/android/README.jni
+++ /dev/null
@@ -1,13 +0,0 @@
-The native portions of Retofit's Android module live in ./jni.
-
-Building:
-
- ./build-jni.sh
-
-Installation:
-
- Copy ./libs to your Android project root.
-
-Testing:
-
- Run test_app on a device or emulator.
diff --git a/modules/android/android.iml b/modules/android/android.iml
deleted file mode 100644
index 3c8944bb69..0000000000
--- a/modules/android/android.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/android/build-jni.sh b/modules/android/build-jni.sh
deleted file mode 100755
index 7d7b062468..0000000000
--- a/modules/android/build-jni.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/sh
-
-if [ ! -d android-ndk ]
-then
- echo Downloading Android NDK...
- curl http://dl.google.com/android/ndk/android-ndk-r5b-darwin-x86.tar.bz2 > /tmp/android-ndk.tgz
- echo Extracting Android NDK...
- tar zxf /tmp/android-ndk.tgz -C /tmp
- mv /tmp/android-ndk-r5b ./android-ndk
-fi
-
-./android-ndk/ndk-build
-
diff --git a/modules/android/libs/armeabi/libretrofit.so b/modules/android/libs/armeabi/libretrofit.so
deleted file mode 100755
index fea64ede63..0000000000
Binary files a/modules/android/libs/armeabi/libretrofit.so and /dev/null differ
diff --git a/modules/android/test_app/.gitignore b/modules/android/test_app/.gitignore
deleted file mode 100644
index 12791a9ad2..0000000000
--- a/modules/android/test_app/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-libs
-gen
-bin
diff --git a/modules/android/test_app/build.properties b/modules/android/test_app/build.properties
deleted file mode 100644
index ee52d86d94..0000000000
--- a/modules/android/test_app/build.properties
+++ /dev/null
@@ -1,17 +0,0 @@
-# This file is used to override default values used by the Ant build system.
-#
-# This file must be checked in Version Control Systems, as it is
-# integral to the build system of your project.
-
-# This file is only used by the Ant script.
-
-# You can use this to override default values such as
-# 'source.dir' for the location of your java source folder and
-# 'out.dir' for the location of your output folder.
-
-# You can also use it define how the release builds are signed by declaring
-# the following properties:
-# 'key.store' for the location of your keystore and
-# 'key.alias' for the name of the key to use.
-# The password will be asked during the build when you use the 'release' target.
-
diff --git a/modules/android/test_app/build.xml b/modules/android/test_app/build.xml
deleted file mode 100644
index da61ebe209..0000000000
--- a/modules/android/test_app/build.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/android/test_app/default.properties b/modules/android/test_app/default.properties
deleted file mode 100644
index 66db0d159b..0000000000
--- a/modules/android/test_app/default.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must be checked in Version Control Systems.
-#
-# To customize properties used by the Ant build system use,
-# "build.properties", and override values to adapt the script to your
-# project structure.
-
-# Project target.
-target=android-10
diff --git a/modules/android/test_app/local.properties b/modules/android/test_app/local.properties
deleted file mode 100644
index 77ed165e6d..0000000000
--- a/modules/android/test_app/local.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-# This file is automatically generated by Android Tools.
-# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
-#
-# This file must *NOT* be checked in Version Control Systems,
-# as it contains information specific to your local configuration.
-
-# location of the SDK. This is only used by Ant
-# For customization when using a Version Control System, please read the
-# header note.
-sdk.dir=${user.home}/android-sdk
diff --git a/modules/android/test_app/test_app.iml b/modules/android/test_app/test_app.iml
deleted file mode 100644
index 461f080c97..0000000000
--- a/modules/android/test_app/test_app.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/core/core.iml b/modules/core/core.iml
deleted file mode 100644
index 868595a22b..0000000000
--- a/modules/core/core.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/http/http.iml b/modules/http/http.iml
deleted file mode 100644
index f7f9948a04..0000000000
--- a/modules/http/http.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/modules/io/io.iml b/modules/io/io.iml
deleted file mode 100644
index 5fac924cc9..0000000000
--- a/modules/io/io.iml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000000..cbf0683f88
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,161 @@
+
+
+
+ 4.0.0
+
+ com.squareup
+ retrofit
+ 1.0.0-SNAPSHOT
+ pom
+
+ Retrofit
+
+ http://github.com/square/retrofit/
+
+
+ core
+ http
+ io
+
+ android
+ android-native
+
+ sample-android
+
+
+
+ UTF-8
+ UTF-8
+
+
+ 3.1.1
+ 1.6
+ 1.1
+
+
+ 2.2.1
+ 2.1
+ 3.0
+ 4.1.3
+
+
+ 4.10
+ 3.1
+
+
+
+ http://github.com/square/retrofit
+ scm:git:git://github.com/square/retrofit.git
+ scm:git:ssh://git@github.com/square/retrofit.git
+
+
+
+ GitHub Issues
+ http://github.com/square/retrofit/issues
+
+
+
+
+ Apache 2.0
+ http://www.apache.org/licenses/LICENSE-2.0.txt
+
+
+
+
+ Square, Inc.
+ http://squareup.com
+
+
+
+
+
+ com.google.android
+ android
+ ${android.version}
+
+
+ com.google.code.gson
+ gson
+ ${gson.version}
+
+
+ com.google.inject
+ guice
+ ${guice.version}
+
+
+ org.apache.httpcomponents
+ httpmime
+ ${httpcomponents.version}
+
+
+ org.apache.httpcomponents
+ httpclient
+ ${httpcomponents.version}
+
+
+
+ org.easymock
+ easymock
+ ${easymock.version}
+
+
+ junit
+ junit
+ ${junit.version}
+
+
+
+
+
+
+
+
+ com.jayway.maven.plugins.android.generation2
+ android-maven-plugin
+ ${android-maven.version}
+
+
+
+ org.sonatype.plugins
+ jarjar-maven-plugin
+ 1.5
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 2.3.2
+
+
+ ${java.version}
+
+
+
+
+
+
+
+ maven-release-plugin
+
+ true
+
+
+
+
+
\ No newline at end of file
diff --git a/revision.properties b/revision.properties
deleted file mode 100644
index a240eb68f6..0000000000
--- a/revision.properties
+++ /dev/null
@@ -1,2 +0,0 @@
-retrofit.revision=0.6-SNAPSHOT
-
diff --git a/modules/android/test_app/AndroidManifest.xml b/sample-android/AndroidManifest.xml
similarity index 100%
rename from modules/android/test_app/AndroidManifest.xml
rename to sample-android/AndroidManifest.xml
diff --git a/sample-android/pom.xml b/sample-android/pom.xml
new file mode 100644
index 0000000000..8f4bc4e39a
--- /dev/null
+++ b/sample-android/pom.xml
@@ -0,0 +1,46 @@
+
+
+
+ 4.0.0
+
+
+ com.squareup
+ retrofit
+ 1.0.0-SNAPSHOT
+ ../pom.xml
+
+
+ com.squareup
+ retrofit-sample-android
+ apk
+ Retrofit Sample: Android
+
+
+
+ com.google.android
+ android
+ provided
+
+
+ com.squareup
+ retrofit-android
+ ${project.version}
+
+
+ com.squareup
+ retrofit-io
+ ${project.version}
+
+
+
+
+
+
+ com.jayway.maven.plugins.android.generation2
+ android-maven-plugin
+ true
+
+
+
+
\ No newline at end of file
diff --git a/modules/android/test_app/src/retrofit/test_app/Main.java b/sample-android/src/main/java/retrofit/test_app/Main.java
similarity index 100%
rename from modules/android/test_app/src/retrofit/test_app/Main.java
rename to sample-android/src/main/java/retrofit/test_app/Main.java