Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RxAndroid Build #2

Closed
benjchristensen opened this issue Aug 22, 2014 · 36 comments
Closed

RxAndroid Build #2

benjchristensen opened this issue Aug 22, 2014 · 36 comments

Comments

@benjchristensen
Copy link
Member

Should the Jar be named rxjava-android-x.y.z.jar or rxandroid-x.y.z.jar ?

@mttkay
Copy link
Collaborator

mttkay commented Aug 23, 2014

How do the other modules do it, like RxScala? Don't really have an opinion on this beyond it being consistent across the Rx* family of libraries.

@benjchristensen
Copy link
Member Author

The languages will be RxLanguage. Non-language modules are up for debate. Some small ones should likely just be rxjava-[name] as they are just extensions that didn't belong in core.

I think RxAndroid is good, similar to RxNetty.

@mttkay
Copy link
Collaborator

mttkay commented Aug 23, 2014

👍

@mttkay
Copy link
Collaborator

mttkay commented Sep 1, 2014

Related, sort of: how are releases managed? If RxAndroid has a life-cycle of its own, where will the releases be hosted (Sonatype OSS?) and are we able to push new versions ourselves?

@benjchristensen
Copy link
Member Author

As a committer on this project you'll be free to release to Maven Central whenever you choose. @quidryan and I are working through the final issues and decisions right now with RxJava and will then finish it on all other projects.

Currently we are using CloudBees+Jenkins and then Bintray/Sonatype to get to JCenter and Maven Central. I really do not like CloudBees+Jenkins though so am seriously looking at TravisCI which I'm liking far better so far. Either way though it will involve Bintray/Sonatype which the Gradle plugin from @quidryan takes care of. We have all the credentials, IDs etc in place ... just getting the minutiae all figured out (for example, I released 1.0.0-rc.2 of RxJava last night but it is not on Maven Central yet ... something wrong along the flow).

@austynmahoney
Copy link
Contributor

Is the rxjava-android package going to be upgraded to v1.x once the new io.reactivex:rxjava package is out of the RC phase? Will it also be moved under the new namespace at that time?

Right now all I see is v0.20.4 in Maven Central. Is this version compatible with 1.0.0-rc.3 (since it is just a different tag of v0.20.4)?

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

@benjchristensen

Currently familiarizing myself with new build tool chain. I wonder what the best way is to install a non-SNAPSHOT build to my local Maven cache?

Some context:
I want to introduce an acceptance test sub-project for RxAndroid which contains tests for key functionality that we will run against actual devices. This can't be a proper Gradle submodule, because it needs to pull in all the Android specific Gradle stuff which is not compatible with the Gradle Java plugin (Google is working on fixing that last thing I heard.)

Long story short, I need to create a compile time dependency to RxAndroid, but it needs to be able to point to pre-release builds, otherwise we wouldn't be able to run these tests before actually releasing something.

I looked at the Nebula RxJava plugin sources and spotted a publish plugin which appears to be used for that? I then tried to ./gradlew publish, but this is always a no-op (Gradle says: UP-TO-DATE)

Any ideas?

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

  • rxjava-project should not apply the Java plugin, so you should be able to use the Android plugin for a project.
  • RxAndroid probably should be a multi-module project, so that you can have a project('') dependency between the acceptance test and the main project.
  • './gradlew install' is how to install to the locally cache

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

@quidryan

I tried to create it as a submodule first, and it would then fail the entire build. It might have been a different problem, I can investigate more.

gradle install installs a SNAPSHOT version to the Maven cache upon which I cannot declare a dependency. What is the suggested way to handle versioning in the Rx contrib projects?

To clarify, this is what I see in my Maven repo after running gradlew install:

> ls ~/.m2/repository/io/reactivex/rxandroid/                                                                                                                ~/Projects/RxAndroid
total 8
0 0.0.1-dev.77+0.x-SNAPSHOT 0 0.0.1-dev.80+0.x-SNAPSHOT 0 0.0.1-dev.81+0.x-SNAPSHOT 8 maven-metadata-local.xml

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

@quidryan

On the submodule thing. As soon as I try to add an Android application project (which the acceptance tests are) to the RxAndroid project as a submodule, the build fails with this message:

A problem occurred evaluating root project 'rxandroid'.
> Could not find method compile() for arguments [io.reactivex:rxjava:1.0.+] on root project 'rxandroid'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

i.e. it suddenly cannot find the compile config anymore. It looks like the com.android.application plugin is somehow messing up the main project config.

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

Did you create the submodule version in a branch that I could look at? One thing the rxjava-project plugin does is insist that a multi-module build a "root" project and any concrete projects are below. E.g.

rxandroid-root
| \__ rxandroid
\___ rxandroid-acceptance 

I'm unsure what would happen if you just put rxandroid-acceptance below rxandroid.

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

I just pushed this: #10

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

I fixed the RxAndroid version to 0.1 for now. That's just so I have something to work with. Happy to switch to any version scheme Netflix is suggesting.

That PR does not add the tests as a submodule. But as soon as you include it in the settings.gradle, you should see the same error.

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

(the version will be calculated from the git tag history, you shouldn't need a version)

I made a multi-project out of your branch, and I see the error concerning the Java plugin. That comes from the performance code in rx projects. And that's because it uses the shadow plugin that forces the Java Plugin, so clearly that's the source of the problem. I'll see what I can do to disable that plugin.

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

I just didn't apply the rxjava project plugin and everything looks fine. Would you like me to push to your branch or another one?

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

Oh okay. I assumed applying the rxjava project plugin was mandatory for the contrib projects? Haven't looked to closely at what it does, but it appears to inject config for release builds.

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

Push away :-)

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

It's primarily for publishing, and I'm assuming that you don't need to
publish the acceptance-tests.

On Tue, Sep 9, 2014 at 8:20 AM, Matthias Käppler notifications@github.com
wrote:

Oh okay. I assume applying the rxjava project plugin was mandatory for the
contrib projects? Haven't looked to closely at what it does, but it appears
to inject config for release builds.


Reply to this email directly or view it on GitHub
#2 (comment).

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

👍

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

Thanks @quidryan !

For some reason the project import now always fails with an obscure Gradle error (that's in IntelliJ 13)

/Users/matthiaskappler/Projects/RxAndroid/acceptance-tests/build.gradle
Error:(6, 0) Cause: com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V

I searched the web for the problem, and there was a similar issue being reported and supposedly fixed in a newer version of IntelliJ. I installed that, but it's still giving me this error. Reading the issue tracker, it seems to be originating in conflicting versions of Guava being used in the Android Gradle plugin and the Gradle tool APIs that ship with IntelliJ? What IDE are you using?

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

Pushed and visible on #10. I haven't actually tested with the Android SDK (still downloading). This might also affect publishing, but we can deal with that later.

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

Here's the ticket: http://youtrack.jetbrains.com/issue/IDEA-127374

It's the only relevant reference I could find for this error message.

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

For this I'm not using an IDE. I typically use IntelliJ. I'll try loading it into an IDE later today.

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

Thanks! Really appreciate your help with all this!

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

Actually, it fails on the command line too (for me)

> gradlew clean build                                                                                                                                        ~/Projects/RxAndroid

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/matthiaskappler/Projects/RxAndroid/acceptance-tests/build.gradle' line: 6

* What went wrong:
A problem occurred evaluating project ':acceptance-tests'.
> com.google.common.io.Closeables.closeQuietly(Ljava/io/Closeable;)V

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

I'll keep digging around for more info on this problem.

@mttkay
Copy link
Collaborator

mttkay commented Sep 9, 2014

Yeah, it's most likely a problem with plugin interop. The error disappears as soon as I take out apply plugin: com.application.android and reimport the project. The whole Java heritage thing with Android never really worked out to begin with...

Any ideas as to what could be causing the friction? Could it be the same issue as reported against IntelliJ, i.e. a conflicting version of Guava used in both the Nebula plugins and the Android Gradle plugin?

@quidryan
Copy link
Collaborator

quidryan commented Sep 9, 2014

Once I download the SDK, I get that error. Should be straight-forward to work around, just have to find the right version of guava.

@mttkay
Copy link
Collaborator

mttkay commented Sep 10, 2014

So, this is getting weird. I tried to exclude the Guava dependency from the Android Gradle plugin, but that didn't help. I then double checked whether it would even depend on Guava, and it seems like it doesn't? I looked at

https://bintray.com/bintray/jcenter/com.android.tools.build:builder

and

https://bintray.com/bintray/jcenter/com.android.tools.build:gradle

but neither depend on Guava. So either one of these pulls Guava in as a 3rd level dependency, or the problem is elsewhere.

@benjchristensen
Copy link
Member Author

Is the rxjava-android package going to be upgraded to v1.x once the new io.reactivex:rxjava package is out of the RC phase? Will it also be moved under the new namespace at that time?

@austynmahoney yes

@mttkay
Copy link
Collaborator

mttkay commented Sep 18, 2014

I'll see what I can do to disable that plugin.

@quidryan Just following up to check if you had time to look into this? I'm kind of stuck.

@mttkay
Copy link
Collaborator

mttkay commented Sep 18, 2014

@benjchristensen are you okay with me removing the 0.x branch and switching it to master (and make it the GH default) now that the library is bumped to 1.x?

@benjchristensen
Copy link
Member Author

If you prefer master go ahead.

@benjchristensen benjchristensen changed the title Artifact Name: rxjava-android or rxandroid? RxAndroid Build Oct 1, 2014
@benjchristensen
Copy link
Member Author

I was going to publish RxAndroid but see that there is a bunch of stuff going on with the other branch. That branch isn't working, and even when I comment out the "acceptance-tests" project the artifact names for rxandroid seem wrong:

ls rxandroid/build/libs/
rxandroid-benchmarks.jar    rxandroid-javadoc.jar       rxandroid-sources.jar       rxandroid.jar

@mttkay
Copy link
Collaborator

mttkay commented Oct 1, 2014

I think we can go ahead with master for now Ben. The branch introduced
acceptance tests, but as I suspected there were issues with compatibility
between the Android Gradle plugin and Nebula.

This shouldn't stop the project from moving forward, however, so feel free
to publish whatever is in master.

@benjchristensen
Copy link
Member Author

Ok. I'll proceed then as RxAndroid 0.21.0 to carry on from rxjava-android 0.20.

@benjchristensen
Copy link
Member Author

RxAndroid 0.21 has been released. https://github.com/ReactiveX/RxAndroid/releases/tag/v0.21.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants