/RxKotlin

RxJava bindings for Kotlin

Primary LanguageKotlinApache License 2.0Apache-2.0

Kotlin Adaptor for RxJava

This adaptor exposes a set of Extension functions that allow a more idiomatic Kotlin usage

    observable<String> { subscriber ->
        subscriber.onNext("H")
        subscriber.onNext("e")
        subscriber.onNext("l")
        subscriber.onNext("")
        subscriber.onNext("l")
        subscriber.onNext("o")
        subscriber.onCompleted()
    }.filter { it.isNotEmpty() }
    .fold (StringBuilder()) { sb, e -> sb.append(e) }
    .map { it.toString() }
    .subscribe { a.received(it) }

    verify(a, times(1)).received("Hello")

Build

Build Status

Binaries

Binaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org.

Example for Maven:

<dependency>
    <groupId>io.reactivex</groupId>
    <artifactId>rxkotlin</artifactId>
    <version>x.y.z</version>
</dependency>

and for Ivy:

<dependency org="io.reactivex" name="rxkotlin" rev="x.y.z" />

and for Gradle:

compile 'io.reactivex:rxkotlin:x.y.z'