ReactiveX / RxAndroid

RxJava bindings for Android
Apache License 2.0
19.88k stars 2.94k forks source link

Add support for Android SDK dependencies #83

Closed dlew closed 9 years ago

dlew commented 10 years ago

Taking off from this discussion, it would be nice if this lib supported Android's support annotations.

At this point, though, we don't actually depend on any of the local repositories that the SDK uses; it's just using the few Android libs floating around in jcenter (which are rather out of date). This keeps the library simpler but limits our ability to add more recent support libraries.

Thoughts? Should we just embrace the local m2 repo?

JakeWharton commented 10 years ago

Yes. Related to what will be done for #74.

JakeWharton commented 10 years ago

This has multiple blockers. First one being https://github.com/nebula-plugins/gradle-rxjava-project-plugin/issues/6.

JakeWharton commented 10 years ago

There's also this horrible transitive dependency on Spock which uses Groovy version-specific artifacts (cue facepalm) so we have to do gross shit like this to force the right version:

configurations.classpath.resolutionStrategy {
    // The 'nebula-test' plugin depends on Spock which is Groovy version specific (gross!). Explicitly
    // force the version which matches our Groovy version.
    eachDependency { DependencyResolveDetails details ->
        if (details.requested.name == 'spock-core') {
            details.useTarget group: details.requested.group, name: details.requested.name, version: '0.7-groovy-2.0'
        }
    }
}
mttkay commented 10 years ago

I'm not sure I understand how turning this into an Android library project relates to being able to use the support-library JARs. Is that because we'd have to apply the Android/Gradle plugin to the core library? Could we add the local SDK repositories to the build scripts instead to perform that lookup? At least as a temporary solution.

I don't see why the library has to be or should be an AAR. The rxandroid-framework might, because it might end up shipping Activities and stuff. Having an AndroidManifest for the main library seems pointless though, so by extension it's pointless to turn it into an AAR?

JakeWharton commented 10 years ago

Being an 'aar' affords us:

I said on some other issue that we can still publish the 'jar' version for legacy builds.

mttkay commented 10 years ago

That's good points there. Agreed then.

JakeWharton commented 9 years ago

Resolved by #189.