mapbox/mapbox-android-sdk — pull request #165 by bleege (2014-02-09 20:14:18+00:00)
Title: Enable Contained SDK Distribution With AAR

@tmcw @fdansv

This is a big change, but a very helpful one IMHO as I think I've solved the distribution / sample app issues discussed in #104 and #143. This enables the MapBox Android SDK to be distributed in a standalone Android Archive (AAR) via Maven (while also maintaining the ability to import the source library directly as discussed in #47). For now I've just added support for referencing the MapBox AAR via a local Maven repository. This should be fine for now as development progresses, and we can add distribution to Maven Central later when ready.

Once merged all that's needed to be done to produce and install locally (which can be run N times as changes to the SDK project change - aka "the airplane use case") is to run the following command:

```sh
gradle clean assembleRelease install
```

From there one can reference the AAR file in their apps by adding this to their Gradle build file.
```
repositories {
mavenLocal()
}
dependencies {
compile 'com.mapbox.mapboxsdk:Mapbox-Android-SDK:1.0.0-SNAPSHOT@aar'
}
```

I've ported the existing Demo app over to a separate Android project that shows how this all can be done (feel free to pull this into the MapBox demo repo - there was not existing code in there so I couldn't fork the project and submit a PR).

https://github.com/bleege/MapBoxAndroidDemo

Finally, and IMHO very importantly, I've removed the demo app code that's been living in /test/ directory. This is important as it:

* Keeps only SDK code in the project and prevents inadvertent code mingling between demo and SDK
* Enables Testing (Unit and UI) - See #107

Feel free to call me if this doesn't make sense or you'd like some more details.