Kotlin has support for SAM (Single Abstract Method) Interfaces as Functions (i.e. Java 8 Lambdas). So you could use Kotlin in RxJava whitout this adaptor
Observable.create<String>{ observer ->
observer!!.onNext("Hello")
observer.onCompleted()
Subscriptions.empty()
}!!.subscribe { result ->
a!!.received(result)
}This adaptor exposes a set of Extension functions that allow a more idiomatic Kotlin usage
import rx.lang.kotlin.*
{(observer: Observer<in String>) ->
observer.onNext("Hello")
observer.onCompleted()
Subscriptions.empty()!!
}.asObservable().subscribe { result ->
a!!.received(result)
}Binaries and dependency information for Maven, Ivy, Gradle and others can be found at http://search.maven.org.
Example for Maven:
<dependency>
<groupId>com.netflix.rxjava</groupId>
<artifactId>rxjava-kotlin</artifactId>
<version>x.y.z</version>
</dependency>and for Ivy:
<dependency org="com.netflix.rxjava" name="rxjava-kotlin" rev="x.y.z" />and for Gradle:
compile 'com.netflix.rxjava:rxjava-kotlin:x.y.z'