Skip to content

Instantly share code, notes, and snippets.

View kosiara's full-sized avatar

Bartosz Kosarzycki kosiara

View GitHub Profile
@timrijckaert
timrijckaert / ImmediateSchedulersRule.java
Created March 5, 2017 22:35
RxJava2 Rule to change the Schedulers to immediate one. (https://www.infoq.com/articles/Testing-RxJava2)
private static class ImmediateSchedulersRule implements TestRule {
@Override
public Statement apply(final Statement base, Description description) {
return new Statement() {
@Override
public void evaluate() throws Throwable {
RxJavaPlugins.setIoSchedulerHandler(scheduler ->
Schedulers.trampoline());
RxJavaPlugins.setComputationSchedulerHandler(scheduler ->
Schedulers.trampoline());
@justasm
justasm / app_build.gradle
Last active May 15, 2020 17:55
Kotlin Android Extensions with Android library module https://youtrack.jetbrains.com/issue/KT-16934
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.kxt"
minSdkVersion 15