Reaktive

Project Url: badoo/Reaktive
Introduction: Kotlin multiplatform implementation of Reactive Extensions
More: Author   ReportBugs   
Tags:

Download Build Status License

Kotlin multiplatform implementation of Reactive Extensions.

Library status: under development, beta pre-release is available, public API is subject to change

Setup

Add Bintray repository into your root build.gradle file:

repositories {
    maven {
        url  "https://dl.bintray.com/badoo/maven"
    }
}

There are four modules published:

  • reaktive - the main Reaktive library (multiplatform)
  • reaktive-annotations - collection of annotations (mutiplatform)
  • reaktive-test - testing utilities (multiplatform)
  • rxjava2-interop - RxJava2 interoperability helpers (JVM and Android)

Each multiplatform module is compiled against each target and published in metadata publishing mode.

Multiplatform modules

Kotlin common:

implementation 'com.badoo.reaktive:<module-name>:<latest-version>'

JVM:

implementation 'com.badoo.reaktive:<module-name>-jvm:<latest-version>'

Android (debug and release):

implementation 'com.badoo.reaktive:<module-name>-android:<latest-version>'

iOS 32:

implementation 'com.badoo.reaktive:<module-name>-ios32:<latest-version>'

iOS 64:

implementation 'com.badoo.reaktive:<module-name>-ios64:<latest-version>'

iOS sim:

implementation 'com.badoo.reaktive:<module-name>-sim:<latest-version>'

JavaScript:

implementation 'com.badoo.reaktive:<module-name>-js:<latest-version>'

Linux x64:

implementation 'com.badoo.reaktive:<module-name>-linuxx64:<latest-version>'

Linux ARM 32 hfp:

implementation 'com.badoo.reaktive:<module-name>-linuxarm32hfp:<latest-version>'

Regular modules:

implementation 'com.badoo.reaktive:<module-name>:<latest-version>'

Features:

  • Multiplatform: JVM, Android, iOS, JavaScript, Linux X64, Linux ARM 32 hfp
  • Schedulers support: computation, IO, trampoline, main
  • True multithreading for Kotlin/Native (there are some limitations)
  • Supported sources: Observable, Maybe, Single, Completable
  • Subjects: PublishSubject, BehaviorSubject
  • Interoperability with RxJava2: conversion of sources between Reaktive and RxJava2, ability to reuse RxJava2's schedulers
  • Supported operators:
    • Observable: asCompletable, collect, combineLatest, concatMap, debounce, defaultIfEmpty, distinctUntilChanged, doOnBeforeXxx, filter, firstOrComplete, firstOrDefault, firstOrError, flatMap, flatMapCompletable, flatMapMaybe, flatMapSingle, flatten, map, merge, notNull, observeOn, ofType, sample, scan, skip, subscribeOn, switchIfEmpty, throttle, toCompletable, toList, withLatestFrom, zip
    • Maybe: asCompletable, asObservable, asSingle, concat, doOnBeforeXxx, filter, flatMap, flatMapCompletable, flatMapObservable, flatMapSingle, flatten, map, merge, notNull, observeOn, ofType, subscribeOn, zip
    • Single: asCompletable, asMaybe, asObservable, blockingGet, concat, doOnBeforeXxx, filter, flatMap, flatMapCompletable, flatMapMaybe, flatMapObservable, flatten, map, merge, notNull, observeOn, subscribeOn, zip
    • Completable: andThen, asMaybe, asObservable, asSingle, concat, doOnBeforeXxx, merge, observeOn, subscribeOn
    • Plus multiple factory and conversion functions

Samples:

Support Me
Apps
About Me
Google+: Trinea trinea
GitHub: Trinea