Skip to content

Commit

Permalink
Merge pull request #208 from ReactiveX/jw/there-can-be-only
Browse files Browse the repository at this point in the history
Update documentation for 1.0.
  • Loading branch information
JakeWharton committed Aug 5, 2015
2 parents f471473 + fade61f commit 17f24e4
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 48 deletions.
34 changes: 33 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,35 @@
# RxJava Releases #
# RxAndroid Releases #

### Version 1.0.0 - August 5th 2015 ####

Initial stable release!

In order to provide a library that no project using RxJava would hesitate to depend on, the decision
was made to remove the APIs which were not absolutely fundamental to all apps. That is what's
contained in this release.

Functionality which was previously part of this library is being explored in separate, modular
libraries:

* `LifecycleObservable`: https://github.com/trello/RxLifecycle
* `ViewObservable` and `WidgetObservable`: https://github.com/JakeWharton/RxBinding

This allows for a simpler process of design, development, and experimentation for the
best ways to provide features like hooks into the lifecycle, binding to UI components, and
simplifying interaction with all of Android's API. Not only can these projects now have their own
release schedule, but it allows developers to pick and choose which ones are appropriate for your
application.

Applications using the various APIs which were previously in this library do not need to update
immediately. Due to the number of APIs removed, switching to 1.0 and the use of these third-party
libraries should be done gradually.

Breaking changes:

* `AndroidSchedulers.handlerThread()` is now `HandlerScheduler.from()`.
* **All other APIs have been removed** aside from `AndroidSchedulers.mainThread()`,
`RxAndroidPlugins`, and `RxAndroidSchedulersHook`.


### Version 0.25 - June 27th 2015 ###

Expand Down Expand Up @@ -29,6 +60,7 @@ This release adds a number of new operators:
* [Pull 22](https://github.com/ReactiveX/RxAndroid/pull/22) Add view state event types to streamline ViewObservable
* [Pull 20](https://github.com/ReactiveX/RxAndroid/pull/20) Add OperatorAdapterViewOnItemClick to observe OnItemClick events in AdapterViews


### Version 0.21 – October 1st 2014 ###

Initial release outside the RxJava core project, no changes.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ When submitting code, please make every effort to follow existing conventions an

## License

By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/ReactiveX/RxJava/blob/master/LICENSE
By contributing your code, you agree to license your contribution under the terms of the APLv2: https://github.com/ReactiveX/RxAndroid/blob/master/LICENSE

All files are released with the Apache 2.0 license.

Expand All @@ -26,4 +26,4 @@ If you are adding a new file it should have a header like this:
* See the License for the specific language governing permissions and
* limitations under the License.
*/
```
```
70 changes: 25 additions & 45 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,31 @@

Android specific bindings for [RxJava](http://github.com/ReactiveX/RxJava).

This module adds a number of classes to RxJava that make writing reactive components in
Android applications easy and hassle free. More specifically, it
This module adds the minimum classes to RxJava that make writing reactive components in Android
applications easy and hassle-free. More specifically, it provides a `Scheduler` that schedules an
on the main UI thread or any given `Handler`.

- provides a `Scheduler` that schedules an `Observable` on a given Android `Handler` thread, particularly the main UI thread

## Communication

Since RxAndroid is part of the RxJava family the communication channels are similar:

- Google Group: [RxJava](http://groups.google.com/d/forum/rxjava)
- Twitter: [@RxJava](http://twitter.com/RxJava)
- [GitHub Issues](https://github.com/ReactiveX/RxAndroid/issues)
- Google Group: [RxJava][list]
- Twitter: [@RxJava][twitter]
- StackOverflow: [rxandroid][so]
- [GitHub Issues][issues]

# Versioning

RxAndroid 0.21 and beyond are published under the `io.reactivex` GroupID and depend on RxJava 1.0.x. Versions 0.20 and earlier were `rxjava-android` and published along with `rxjava-core` under the `com.netflix.rxjava` GroupID.

RxAndroid is staying on the 0.x versioning for now despite RxJava hitting 1.0 as it is not yet felt that the RxAndroid APIs are stabilized.

All usage of 0.20.x and earlier under `com.netflix.rxjava` should eventually be migrated to RxJava 1.x and `io.reactivex`. This was done as part of the migration of the project from `Netflix/RxJava` to `ReactiveX/RxJava` and `ReactiveX/RxAndroid`.

During the transition it will be possible for an application to resolve both the `com.netflix.rxjava` and `io.reactivex` artifacts. This is unfortunate but was accepted as a reasonable cost for adopting the new name as we hit version 1.0.

The RxJava 0.20.x branch is being maintained with bug fixes on the `com.netflix.rxjava` GroupId until version 1.0 Final is released to allow time to migrate between the artifacts.

# Binaries

Binaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Crxandroid).

<a href='http://search.maven.org/#search%7Cga%7C1%7Crxandroid'><img src='http://img.shields.io/maven-central/v/io.reactivex/rxandroid.svg'></a>

Example for Maven:

```xml
<dependency>
<groupId>io.reactivex</groupId>
<artifactId>rxandroid</artifactId>
<version>0.25.0</version>
</dependency>
```groovy
compile 'io.reactivex:rxandroid:1.0.0'
```

and for Ivy:
<a href='http://search.maven.org/#search%7Cga%7C1%7Crxandroid'><img src='http://img.shields.io/maven-central/v/io.reactivex/rxandroid.svg'></a>

```xml
<dependency org="io.reactivex" name="rxandroid" rev="0.25.0" />
```
Additional binaries and dependency information for can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Crxandroid).

and for Gradle:
```groovy
compile 'io.reactivex:rxandroid:0.25.0'
```

## Build

Expand All @@ -64,15 +38,15 @@ $ cd RxAndroid/
$ ./gradlew build
```

Futher details on building can be found on the RxJava [Getting Started](https://github.com/ReactiveX/RxJava/wiki/Getting-Started) page of the wiki.
Futher details on building can be found on the RxJava [Getting Started][start] page of the wiki.

<a href='https://travis-ci.org/ReactiveX/RxAndroid/builds'><img src='https://travis-ci.org/ReactiveX/RxAndroid.svg?branch=0.x'></a>
<a href='https://travis-ci.org/ReactiveX/RxAndroid/builds'><img src='https://travis-ci.org/ReactiveX/RxAndroid.svg?branch=master'></a>


# Sample usage

We are working on a samples project which provides runnable code samples that demonstrate common Rx patterns and
their use in Android applications.
A sample project which provides runnable code examples that demonstrate uses of the classes in this
project is available in the `sample-app/` folder.

## Observing on the UI thread

Expand All @@ -83,7 +57,6 @@ to be observed on the main thread:

```java
public class ReactiveFragment extends Fragment {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Expand All @@ -99,7 +72,7 @@ This will execute the Observable on a new thread, and emit results through `onNe
## Observing on arbitrary threads
The previous sample is merely a specialization of a more general concept, namely binding asynchronous
communication to an Android message loop using the `Handler` class. In order to observe an `Observable`
on an arbitrary thread, create a `Handler` bound to that thread and use the `AndroidSchedulers.handlerThread`
on an arbitrary thread, create a `Handler` bound to that thread and use the `HandlerScheduler.from`
scheduler:

```java
Expand All @@ -109,7 +82,7 @@ new Thread(new Runnable() {
final Handler handler = new Handler(); // bound to this thread
Observable.just("one", "two", "three", "four", "five")
.subscribeOn(Schedulers.newThread())
.observeOn(AndroidSchedulers.handlerThread(handler))
.observeOn(HandlerScheduler.from(handler))
.subscribe(/* an Observer */)

// perform work, ...
Expand All @@ -124,7 +97,8 @@ shall suffice to illustrate the idea.)

## Bugs and Feedback

For bugs, questions and discussions please use the [Github Issues](https://github.com/ReactiveX/RxAndroid/issues).
For bugs, feature requests, and discussion please use [Github Issues][issues].
For general usage questions please use the [mailing list][list] or [StackOverflow][so].


## LICENSE
Expand All @@ -142,3 +116,9 @@ See the License for the specific language governing permissions and
limitations under the License.



[list]: http://groups.google.com/d/forum/rxjava
[so]: http://stackoverflow.com/questions/tagged/rx-android
[twitter]: http://twitter.com/RxJava
[issues]: https://github.com/ReactiveX/RxAndroid/issues
[start]: https://github.com/ReactiveX/RxJava/wiki/Getting-Started

0 comments on commit 17f24e4

Please sign in to comment.