From 9fc3fa7f19af5df2d370e55ec8bd0c3ffdc68265 Mon Sep 17 00:00:00 2001 From: ganfra Date: Wed, 29 Jan 2020 21:14:38 +0100 Subject: [PATCH] Update some libs and remove incremental from dagger --- build.gradle | 12 ------------ matrix-sdk-android/build.gradle | 11 ++++++----- vector/build.gradle | 4 ++-- .../vector/riotx/core/platform/VectorBaseActivity.kt | 3 +-- .../platform/VectorBaseBottomSheetDialogFragment.kt | 5 ++--- .../vector/riotx/core/platform/VectorBaseFragment.kt | 4 ++-- 6 files changed, 13 insertions(+), 26 deletions(-) diff --git a/build.gradle b/build.gradle index 29351e403f..a2fac55175 100644 --- a/build.gradle +++ b/build.gradle @@ -47,23 +47,11 @@ allprojects { jcenter() } - tasks.withType(JavaCompile).all { - options.compilerArgs += [ - '-Adagger.gradle.incremental=enabled' - ] - } - tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all { // Warnings are potential errors, so stop ignoring them kotlinOptions.allWarningsAsErrors = true } - afterEvaluate { - extensions.findByName("kapt")?.arguments { - arg("dagger.gradle.incremental", "enabled") - } - } - } task clean(type: Delete) { diff --git a/matrix-sdk-android/build.gradle b/matrix-sdk-android/build.gradle index b902108680..529737be37 100644 --- a/matrix-sdk-android/build.gradle +++ b/matrix-sdk-android/build.gradle @@ -92,10 +92,11 @@ dependencies { def arrow_version = "0.8.2" def moshi_version = '1.8.0' - def lifecycle_version = '2.1.0' + def lifecycle_version = '2.2.0' + def arch_version = '2.1.0' def coroutines_version = "1.3.2" def markwon_version = '3.1.0' - def daggerVersion = '2.24' + def daggerVersion = '2.25.4' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutines_version" @@ -104,7 +105,7 @@ dependencies { implementation "androidx.appcompat:appcompat:1.1.0" implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version" - kapt "androidx.lifecycle:lifecycle-compiler:$lifecycle_version" + implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version" // Network implementation 'com.squareup.retrofit2:retrofit:2.6.2' @@ -124,7 +125,7 @@ dependencies { kapt 'dk.ilios:realmfieldnameshelper:1.1.1' // Work - implementation "androidx.work:work-runtime-ktx:2.3.0-beta02" + implementation "androidx.work:work-runtime-ktx:2.3.0" // FP implementation "io.arrow-kt:arrow-core:$arrow_version" @@ -166,7 +167,7 @@ dependencies { androidTestImplementation 'org.amshove.kluent:kluent-android:1.44' // Note: version sticks to 1.9.2 due to https://github.com/mockk/mockk/issues/281 androidTestImplementation 'io.mockk:mockk-android:1.9.2.kotlin12' - androidTestImplementation "androidx.arch.core:core-testing:$lifecycle_version" + androidTestImplementation "androidx.arch.core:core-testing:$arch_version" androidTestImplementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version" } diff --git a/vector/build.gradle b/vector/build.gradle index 14ec9f2c21..ac7fa3f735 100644 --- a/vector/build.gradle +++ b/vector/build.gradle @@ -223,14 +223,14 @@ android { dependencies { def epoxy_version = '3.9.0' - def fragment_version = '1.2.0-rc04' + def fragment_version = '1.2.0' def arrow_version = "0.8.2" def coroutines_version = "1.3.2" def markwon_version = '4.1.2' def big_image_viewer_version = '1.6.2' def glide_version = '4.10.0' def moshi_version = '1.8.0' - def daggerVersion = '2.24' + def daggerVersion = '2.25.4' def autofill_version = "1.0.0" implementation project(":matrix-sdk-android") diff --git a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt index 5c73fc97da..d57b11d93d 100644 --- a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt +++ b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseActivity.kt @@ -38,7 +38,6 @@ import androidx.fragment.app.FragmentFactory import androidx.fragment.app.FragmentManager import androidx.lifecycle.Observer import androidx.lifecycle.ViewModelProvider -import androidx.lifecycle.ViewModelProviders import butterknife.BindView import butterknife.ButterKnife import butterknife.Unbinder @@ -92,7 +91,7 @@ abstract class VectorBaseActivity : AppCompatActivity(), HasScreenInjector { private lateinit var viewModelFactory: ViewModelProvider.Factory protected val viewModelProvider - get() = ViewModelProviders.of(this, viewModelFactory) + get() = ViewModelProvider(this, viewModelFactory) /* ========================================================================================== * DATA diff --git a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseBottomSheetDialogFragment.kt b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseBottomSheetDialogFragment.kt index b3a56f48ee..b24c685dba 100644 --- a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseBottomSheetDialogFragment.kt +++ b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseBottomSheetDialogFragment.kt @@ -22,7 +22,6 @@ import android.os.Parcelable import android.widget.FrameLayout import androidx.annotation.CallSuper import androidx.lifecycle.ViewModelProvider -import androidx.lifecycle.ViewModelProviders import com.airbnb.mvrx.MvRx import com.airbnb.mvrx.MvRxView import com.airbnb.mvrx.MvRxViewId @@ -50,10 +49,10 @@ abstract class VectorBaseBottomSheetDialogFragment : BottomSheetDialogFragment() private lateinit var viewModelFactory: ViewModelProvider.Factory protected val activityViewModelProvider - get() = ViewModelProviders.of(requireActivity(), viewModelFactory) + get() = ViewModelProvider(requireActivity(), viewModelFactory) protected val fragmentViewModelProvider - get() = ViewModelProviders.of(this, viewModelFactory) + get() = ViewModelProvider(this, viewModelFactory) /* ========================================================================================== * BottomSheetBehavior diff --git a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseFragment.kt b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseFragment.kt index 91c166a96c..93a48ed925 100644 --- a/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseFragment.kt +++ b/vector/src/main/java/im/vector/riotx/core/platform/VectorBaseFragment.kt @@ -71,10 +71,10 @@ abstract class VectorBaseFragment : BaseMvRxFragment(), HasScreenInjector { private lateinit var viewModelFactory: ViewModelProvider.Factory protected val activityViewModelProvider - get() = ViewModelProviders.of(requireActivity(), viewModelFactory) + get() = ViewModelProvider(requireActivity(), viewModelFactory) protected val fragmentViewModelProvider - get() = ViewModelProviders.of(this, viewModelFactory) + get() = ViewModelProvider(this, viewModelFactory) /* ========================================================================================== * Life cycle