Blueprint Threading Coroutines

Wrapper API for threading with Kotlin CoroutineDispatcher

License

License

Categories

Categories

React User Interface Web Frameworks
GroupId

GroupId

io.github.reactivecircus.blueprint
ArtifactId

ArtifactId

blueprint-threading-coroutines
Last Version

Last Version

1.3.1
Release Date

Release Date

Type

Type

jar
Description

Description

Blueprint Threading Coroutines
Wrapper API for threading with Kotlin CoroutineDispatcher
Project URL

Project URL

https://github.com/reactivecircus/blueprint
Source Code Management

Source Code Management

https://github.com/reactivecircus/blueprint

Download blueprint-threading-coroutines

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.reactivecircus.blueprint/blueprint-threading-coroutines/ -->
<dependency>
    <groupId>io.github.reactivecircus.blueprint</groupId>
    <artifactId>blueprint-threading-coroutines</artifactId>
    <version>1.3.1</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.reactivecircus.blueprint/blueprint-threading-coroutines/
implementation 'io.github.reactivecircus.blueprint:blueprint-threading-coroutines:1.3.1'
// https://jarcasting.com/artifacts/io.github.reactivecircus.blueprint/blueprint-threading-coroutines/
implementation ("io.github.reactivecircus.blueprint:blueprint-threading-coroutines:1.3.1")
'io.github.reactivecircus.blueprint:blueprint-threading-coroutines:jar:1.3.1'
<dependency org="io.github.reactivecircus.blueprint" name="blueprint-threading-coroutines" rev="1.3.1">
  <artifact name="blueprint-threading-coroutines" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.reactivecircus.blueprint', module='blueprint-threading-coroutines', version='1.3.1')
)
libraryDependencies += "io.github.reactivecircus.blueprint" % "blueprint-threading-coroutines" % "1.3.1"
[io.github.reactivecircus.blueprint/blueprint-threading-coroutines "1.3.1"]

Dependencies

runtime (2)

Group / Artifact Type Version
org.jetbrains.kotlin : kotlin-stdlib-jdk8 jar 1.3.61
org.jetbrains.kotlinx : kotlinx-coroutines-core jar 1.3.2

test (3)

Group / Artifact Type Version
junit : junit jar 4.12
org.amshove.kluent : kluent jar 1.58
org.jetbrains.kotlinx : kotlinx-coroutines-test jar 1.3.2

Project Modules

There are no modules declared in this project.

Blueprint

CI Maven Central Android API License

Architectural frameworks and toolkits for bootstrapping modern Android codebases, written in Kotlin.

Motivation

These days whenever I kickoff a new Android project I always start by adding a bunch of infrastructure code (frameworks and toolkits) I developed over the years as they work really well in modern Android codebases which follow Clean Architecture and reactive paradigm, with strong emphasis on automated UI testing.

These frameworks and toolkits have now become a library.

Dependencies

Blueprint offers multiple independent artifacts covering different use cases. But they are all "optional" which means you can choose to only use the ones that make sense for your codebase.

Dependencies are hosted on Maven Central.

Latest stable version:

def blueprint_version = "1.14.1"

If you use Kotlin Coroutines and Flow:

// Building Interactors based on Kotlin Coroutines and Flow
implementation "io.github.reactivecircus.blueprint:blueprint-interactor-coroutines:${blueprint_version}"

// Wrapper API for doing async work with Kotlin CoroutineDispatcher
implementation "io.github.reactivecircus.blueprint:blueprint-async-coroutines:${blueprint_version}"

// Android UI extensions, utilities and widgets
implementation "io.github.reactivecircus.blueprint:blueprint-ui:${blueprint_version}"

// Android UI testing framework with Testing Robot DSL
implementation "io.github.reactivecircus.blueprint:blueprint-testing-robot:${blueprint_version}"

If you use RxJava 2:

// Building Interactors based on RxJava 2
implementation "io.github.reactivecircus.blueprint:blueprint-interactor-rx2:${blueprint_version}"

// Wrapper API for doing async work with RxJava 2 Schedulers
implementation "io.github.reactivecircus.blueprint:blueprint-async-rx2:${blueprint_version}"

// Android UI extensions, utilities and widgets
implementation "io.github.reactivecircus.blueprint:blueprint-ui:${blueprint_version}"

// Android UI testing framework with Testing Robot DSL
implementation "io.github.reactivecircus.blueprint:blueprint-testing-robot:${blueprint_version}"

If you use RxJava 3:

// Building Interactors based on RxJava 3
implementation "io.github.reactivecircus.blueprint:blueprint-interactor-rx3:${blueprint_version}"

// Wrapper API for doing async work with RxJava 3 Schedulers
implementation "io.github.reactivecircus.blueprint:blueprint-async-rx3:${blueprint_version}"

// Android UI extensions, utilities and widgets
implementation "io.github.reactivecircus.blueprint:blueprint-ui:${blueprint_version}"

// Android UI testing framework with Testing Robot DSL
implementation "io.github.reactivecircus.blueprint:blueprint-testing-robot:${blueprint_version}"

Snapshots of the development version are available in Sonatype's snapshots repository.

Samples

There are a couple of sample apps demonstrating how you may use Blueprint, one based on Kotlin Coroutines and the other one based on RxJava 2.

Overview

The following is a high-level overview of what each Blueprint artifact does. For details and sample usage please check the samples and the documentation (README.md) in each of the sub-projects.

Blueprint Interactor Coroutines

This artifact provides 2 base classes for building Interactors (use case in Clean Architecture):

  • SuspendingInteractor for single-shot tasks
  • FlowInteractor for cold streams

Please check blueprint-interactor-coroutines for details.

Blueprint Async Coroutines

This artifact provides a CoroutineDispatcherProvider API for encapsulating the threading behavior with Kotlin CoroutineDispatcher.

Please check blueprint-async-coroutines for details.

Blueprint Interactor RxJava 2

This artifact provides 3 base classes for building Interactors (use case in Clean Architecture):

  • SingleInteractor for single-shot (with result) tasks
  • CompletableInteractor for single-shot (no result) tasks
  • ObservableInteractor for cold streams

Please check blueprint-interactor-rx2 for details.

Blueprint Async RxJava 2

This artifact provides a SchedulerProvider API for encapsulating the threading behavior with RxJava 2 Schedulers.

Please check blueprint-async-rx2 for details.

Blueprint Interactor RxJava 3

This artifact provides 3 base classes for building Interactors (use case in Clean Architecture):

  • SingleInteractor for single-shot (with result) tasks
  • CompletableInteractor for single-shot (no result) tasks
  • ObservableInteractor for cold streams

Please check blueprint-interactor-rx3 for details.

Blueprint Async RxJava 3

This artifact provides a SchedulerProvider API for encapsulating the threading behavior with RxJava 3 Schedulers.

Please check blueprint-async-rx3 for details.

Blueprint UI

This artifact provides convenient Kotlin extensions and widgets for working with the Android UI toolkit.

Please check blueprint-ui for details.

Blueprint Testing Robot

This artifact provides a UI testing framework and Testing Robot DSL for authoring structured, readable, and framework-agnostic UI tests.

Please check blueprint-testing-robot for details.

License

Copyright 2019 Yang Chen

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
io.github.reactivecircus.blueprint

Reactive Circus

A bunch of open source projects mostly around Android - apps, tooling, libraries and experiments.

Versions

Version
1.3.1
1.3.0
1.2.0
1.1.0
1.0.1
1.0.0