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

Initial commit of the Android samples module #930

Merged
merged 11 commits into from
Mar 12, 2014

Conversation

mttkay
Copy link
Contributor

@mttkay mttkay commented Feb 26, 2014

refs https://github.com/soundcloud/RxJava/issues/3

I made it so that the samples project will automatically be pulled in as soon as it detects an Android SDK on the build machine; otherwise it's ignored. It also runs in a sub-gradle so should not be affected by changes to the main project. It does, however, automatically pull in and compile against the current project version.

Let me know what you think. I kept the actual samples minimal for now, I see this more as a tracer bullet for how the samples could fit into the current build setup.

@cloudbees-pull-request-builder

RxJava-pull-requests #870 FAILURE
Looks like there's a problem with this pull request

@mttkay
Copy link
Contributor Author

mttkay commented Feb 26, 2014

The test failure looks unrelated to this PR.

@mttkay
Copy link
Contributor Author

mttkay commented Feb 27, 2014

Sorry, realized too late that the samples project wouldn't import into Android Studio when looked at in isolation (i.e. outside the main project.) There was also a broken method reference. Fixed that.

@cloudbees-pull-request-builder

RxJava-pull-requests #875 FAILURE
Looks like there's a problem with this pull request

@mttkay
Copy link
Contributor Author

mttkay commented Feb 27, 2014

Okay this is actually a genuine failure. It looks as if there's an Android SDK installed on the build server, so it tried to compile the samples build. The stack trace isn't very revealing though. @gbenson-nflx could you have a look at this? Might involve digging around on the build machine to which I don't have access.

@mttkay
Copy link
Contributor Author

mttkay commented Mar 2, 2014

Do you guys have time to look into this? Otherwise I'd simply disable the sample app build for now, even when a framework SDK is detected.

@gbenson-nflx
Copy link

I haven't had a chance. I'm not familiar with the build machine... Maybe try Ben.

@benjchristensen
Copy link
Member

I have no clue what to do with that ... nor do I know what the Android SDK is doing on a CloudBees build server. Perhaps so Android apps can be built on their build slaves?

@mttkay
Copy link
Contributor Author

mttkay commented Mar 6, 2014

Ben how about I always exclude the samples build for the time being and
enable it via an explicit task or build parameter? Then it should not
interfere with anything in the core build infrastructure.
On Mar 6, 2014 7:04 AM, "Ben Christensen" notifications@github.com wrote:

I have no clue what to do with that ... nor do I know what the Android SDK
is doing on a CloudBees build server. Perhaps so Android apps can be built
on their build slaves?

Reply to this email directly or view it on GitHubhttps://github.com//pull/930#issuecomment-36827758
.

@benjchristensen
Copy link
Member

Works for me.

@cloudbees-pull-request-builder

RxJava-pull-requests #891 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

RxJava-pull-requests #892 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

RxJava-pull-requests #894 SUCCESS
This pull request looks good

@cloudbees-pull-request-builder

RxJava-pull-requests #895 SUCCESS
This pull request looks good

@mttkay
Copy link
Contributor Author

mttkay commented Mar 12, 2014

@gbenson-nflx @benjchristensen Feel free to merge this in any time. Samples are of course a moving target, but this project builds fine and is working and I already got a few samples in that cover the most useful use cases I could think of for now.

I was wondering, do you see a way to make it easier to add code to the samples project in the future? Opening a PR against the core project seems like process overhead for everyone involved (unless you're fine with that.) I guess that's the downside of this living in the core project folder

@cloudbees-pull-request-builder

RxJava-pull-requests #896 SUCCESS
This pull request looks good

@gbenson-nflx
Copy link

Matthias, thanks for doing this. Much appreciate it.
Not sure about the PRs against core project - probably more on Ben.

@benjchristensen
Copy link
Member

I was wondering, do you see a way to make it easier to add code to the samples project in the future?

The solution will be to split this out once we migrate away from the current home so RxAndroid has it's own place and have it managed and run by Android developers specifically such as yourself who manage the commits, PRs, releases etc.

@headinthebox and I are getting close to having that roadmap. It should be in the timeframe of months. In the meantime, just keep sending the PRs and I'll merge them :-)

benjchristensen added a commit that referenced this pull request Mar 12, 2014
Initial commit of the Android samples module
@benjchristensen benjchristensen merged commit 557e18a into ReactiveX:master Mar 12, 2014
@mttkay
Copy link
Contributor Author

mttkay commented Mar 12, 2014

Thanks -- I forgot to mention @gbenson-nflx, you can trigger the samples build from the parent project like so:

./gradlew build -PbuildAndroidSamples

Without that property the build proceeds as usual and simply ignores the Android samples.

@gbenson-nflx
Copy link

@mttkay,
If I execute "./gradlew build" from the project root (/RxJava) then things
build without issue.

However, when I run via "./gradlew build -PbuildAndroidSamples" from the
root, then I get:

  • Where:
    Build file
    '/Users/gbenson/RxJava/rxjava-contrib/rxjava-android-samples-build-wrapper/build.gradle'
    line: 5
  • What went wrong:
    Execution failed for task
    ':rxjava-contrib:rxjava-android-samples-build-wrapper:build'.

-g

On Wed, Mar 12, 2014 at 10:23 AM, Matthias Käppler <notifications@github.com

wrote:

Thanks -- I forgot to mention @gbenson-nflxhttps://github.com/gbenson-nflx,
you can trigger the samples build like so:

./gradlew build -PbuildAndroidSamples

Without that property the build proceeds as usual and simply ignores the
Android samples.

Reply to this email directly or view it on GitHubhttps://github.com//pull/930#issuecomment-37437231
.

@mttkay
Copy link
Contributor Author

mttkay commented Mar 12, 2014

Hi Greg,

Odd, this works on my machine. I wonder if I forgot to commit something or
am relying on machine specific configuration.

Could you build with the -i option to get the full error log? It's
difficult to say from over here why it's failing.

Also, does it build if you enter the samples folder and invoke the samples
build script directly, i.e without going through the build wrapper module?

@gbenson-nflx
Copy link

Not a major issue. Things are working on another machine I have.

If I see an issue again I'll try to fix. For now, happy to be playing with
the samples :)

-g

On Wed, Mar 12, 2014 at 2:13 PM, Matthias Käppler
notifications@github.comwrote:

Hi Greg,

Odd, this works on my machine. I wonder if I forgot to commit something or
am relying on machine specific configuration.

Could you build with the -i option to get the full error log? It's
difficult to say from over here why it's failing.

Also, does it build if you enter the samples folder and invoke the samples
build script directly, i.e without going through the build wrapper module?

Reply to this email directly or view it on GitHubhttps://github.com//pull/930#issuecomment-37465995
.

@mttkay
Copy link
Contributor Author

mttkay commented Mar 14, 2014

Glad to hear!

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

Successfully merging this pull request may close these issues.

None yet

4 participants