ReactiveX/RxAndroid — pull request #43 by mttkay (2014-11-07 11:27:35+00:00)
Title: [WIP] New project structure based on submodules (added samples module)

So, I finally got around to doing this. There was another PR open (#10) which turned into a dead end, since there were plugin incompatibilities between the stuff that RxJava/Nebula pulls in and the Android Gradle plugin.

This is the second attempt, in which I used my "build wrapper" hack again that I used for the original rxjava-android module back when it was part of core. I know it's not pretty, but at least it works. What it does is create two submodules for every Android project (like samples, or integration tests), the actual module and a build wrapper. The build wrapper becomes a submodule of the root project, and when it receives the build command it forwards it to a "sub-Gradle" in the actual target module. That way all the Android projects that are submodules can be completely self-contained sandboxes and have their own Gradle wrapper, so no plugins can clash.

I do share the library versions (project and core libs) via the root properties, by having the wrapped modules load and parse the root properties file :-/

Long story short: this will finally enable us to have
- a samples submodule that builds with the root project and can be imported separately into Android Studio (already included in this PR, although the samples need to be updated...)
- an acceptance test submodule to run Android instrumentation tests on real devices against RxAndroid, so as to discover regressions more quickly
- a framework library submodule to contain the work @Dorvaryn has started

Let me know what you think!