BharathMG / Reaktive

Kotlin multi-platform implementation of Reactive Extensions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

Kotlin multi-platform implementation of Reactive Extensions.

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

Setup

Add JitPack repository into your root build.gradle file:

allprojects {
    repositories {
        ...
        maven { url 'https://jitpack.io' }
    }
}

Add the following dependencies into your module's build.gradle file:

Main library

Kotlin multi-platform:

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

Kotlin Android:

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

Kotlin JVM:

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

Kotlin JavaScript:

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

Kotlin Linux x64:

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

Kotlin Linux ARM 32 hfp:

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

RxJava2 interoperability

implementation 'com.github.badoo.reaktive:rxjava2-interop:<latest-version>'

Features:

  • Multiplatform: JVM, Android, JavaScript, Linux X64, Linux ARM 32 hfp, iOS in next release
  • 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, distinctUntilChanged, doOnBeforeXxx, filter, firstOrComplete, firstOrDefault, firstOrError, flatMap, flatMapCompletable, flatMapMaybe, flatMapSingle, flatten, map, merge, notNull, observeOn, ofType, sample, scan, subscribeOn, 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, flatMap, flatMapCompletable, flatMapMaybe, flatMapObservable, flatten, map, merge, notNull, observeOn, subscribeOn, zip
    • Completable: asMaybe, asObservable, asSingle, concat, doOnBeforeXxx, merge, observeOn, subscribeOn
    • Plus multiple factory and conversion functions

Samples:

About

Kotlin multi-platform implementation of Reactive Extensions

License:Apache License 2.0


Languages

Language:Kotlin 98.2%Language:Swift 1.3%Language:HTML 0.5%