From de91b0c051b63132605f6028af4928fa86981be6 Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 25 Jun 2021 00:39:14 +0700 Subject: [PATCH] update deps --- build.gradle | 12 ++++++------ gradle/wrapper/gradle-wrapper.properties | 2 +- reactiveviewmodel/build.gradle | 2 -- .../reactiveviewmodel/core/property/State.kt | 7 +++---- 4 files changed, 10 insertions(+), 13 deletions(-) diff --git a/build.gradle b/build.gradle index eecba5e..03e5475 100644 --- a/build.gradle +++ b/build.gradle @@ -3,21 +3,21 @@ buildscript { ext { min_sdk_version = 17 - sdk_version = 29 + sdk_version = 30 - kotlin_version = '1.4.32' + kotlin_version = '1.5.20' rxjava_version = '3.0.12' rxandroid_version = '3.0.0' archx_version = '2.2.0' - appcompatx_version = '1.2.0' + appcompatx_version = '1.3.0' material_version = '1.3.0' } repositories { google() - jcenter() + mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:4.1.3' + classpath 'com.android.tools.build:gradle:4.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1' // NOTE: Do not place your application dependencies here; they belong @@ -28,7 +28,7 @@ buildscript { allprojects { repositories { google() - jcenter() + mavenCentral() } } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 1d552ba..91e90cd 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip diff --git a/reactiveviewmodel/build.gradle b/reactiveviewmodel/build.gradle index 449eb01..1dba571 100644 --- a/reactiveviewmodel/build.gradle +++ b/reactiveviewmodel/build.gradle @@ -29,8 +29,6 @@ dependencies { androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" - implementation "io.reactivex.rxjava3:rxandroid:$rxandroid_version" implementation "io.reactivex.rxjava3:rxjava:$rxjava_version" diff --git a/reactiveviewmodel/src/main/java/com/alexdeww/reactiveviewmodel/core/property/State.kt b/reactiveviewmodel/src/main/java/com/alexdeww/reactiveviewmodel/core/property/State.kt index f1cb307..9b2093a 100644 --- a/reactiveviewmodel/src/main/java/com/alexdeww/reactiveviewmodel/core/property/State.kt +++ b/reactiveviewmodel/src/main/java/com/alexdeww/reactiveviewmodel/core/property/State.kt @@ -13,10 +13,9 @@ class State internal constructor( debounceInterval: Long? = null ) { - private val subject = if (initValue == null) { - BehaviorSubject.create() - } else { - BehaviorSubject.createDefault(initValue) + private val subject = when (initValue) { + null -> BehaviorSubject.create() + else -> BehaviorSubject.createDefault(initValue) } private val serializedSubject = subject.toSerialized()