Skip to content

Commit 6d6f7c2

Browse files
author
Adrián García
committed
Upgrade dependencies
1 parent 0fd656f commit 6d6f7c2

File tree

8 files changed

+30
-19
lines changed

8 files changed

+30
-19
lines changed

app/build.gradle

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
buildscript {
22
ext {
3-
kotlinx_coroutines_version = "0.13"
43
spek_version = '1.1.0'
54
dagger_version = "2.15"
6-
rx_version = "2.0.3"
75
rx_android_version = "2.0.2"
86
leak_canary_version = "1.5"
97
butterkinfe_version = "8.4.0"

build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ apply plugin: 'com.gladed.androidgitversion'
33

44
buildscript {
55
ext {
6-
kotlin_version = "1.3.50"
6+
kotlin_version = "1.3.61"
77

88
android_compile_sdk = 29
99
android_target_sdk = 29
1010
android_build_tools_version = "29.0.1"
1111

12-
lifecycle_version = "2.1.0"
12+
lifecycle_version = "2.2.0"
1313
rx_version = "2.2.6"
14-
coroutines_version = "1.3.2"
14+
coroutines_version = "1.3.3"
1515
}
1616

1717
repositories {
@@ -22,11 +22,11 @@ buildscript {
2222
}
2323

2424
dependencies {
25-
classpath "com.android.tools.build:gradle:3.5.0"
25+
classpath "com.android.tools.build:gradle:3.5.3"
2626
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
2727
classpath "org.junit.platform:junit-platform-gradle-plugin:1.0.0"
2828
classpath "com.github.dcendents:android-maven-gradle-plugin:2.1"
29-
classpath "com.gladed.androidgitversion:gradle-android-git-version:0.4.10"
29+
classpath "com.gladed.androidgitversion:gradle-android-git-version:0.4.11"
3030
classpath "com.github.ben-manes:gradle-versions-plugin:0.21.0"
3131
}
3232
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
# Specifies the JVM arguments used for the daemon process.
88
# The setting is particularly useful for tweaking memory settings.
99
org.gradle.jvmargs=-Xmx1536m
10-
kotlin.coroutines=enable
1110
android.useAndroidX=true
1211
android.enableJetifier=true
1312
# When configured, Gradle will run in incubating parallel mode.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

mini-android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ dependencies {
2626

2727
api "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutines_version"
2828
api "androidx.appcompat:appcompat:1.1.0"
29-
api "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0-alpha05"
29+
api "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0"
3030

3131
testImplementation "junit:junit:4.12"
3232
androidTestImplementation "androidx.test:runner:1.2.0"

mini-kodein-android/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@ android {
1919
proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro"
2020
}
2121
}
22+
23+
compileOptions {
24+
sourceCompatibility = JavaVersion.VERSION_1_8
25+
targetCompatibility = JavaVersion.VERSION_1_8
26+
}
27+
kotlinOptions {
28+
jvmTarget = JavaVersion.VERSION_1_8
29+
}
2230
}
2331

2432
dependencies {

mini-kodein-android/src/main/java/mini/kodein/android/KodeinAndroidUtils.kt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import androidx.fragment.app.Fragment
55
import androidx.fragment.app.FragmentActivity
66
import androidx.lifecycle.ViewModel
77
import androidx.lifecycle.ViewModelProvider
8-
import androidx.lifecycle.ViewModelProviders
98
import org.kodein.di.DKodein
109
import org.kodein.di.Kodein
1110
import org.kodein.di.KodeinAware
@@ -36,7 +35,7 @@ inline fun <reified VM : ViewModel, reified F : ViewModelProvider.Factory> Kodei
3635
*
3736
* Optionally you can decide if you want all instances to be force-provided by module bindings or
3837
* if you allow creating new instances of them via [Class.newInstance] with [allowNewInstance].
39-
* The default is true to mimic the default behaviour of [ViewModelProviders.of].
38+
* The default is true to mimic the default behaviour of [ViewModelProvider].
4039
*/
4140
class KodeinViewModelFactory(private val injector: DKodein,
4241
private val allowNewInstance: Boolean = true) : ViewModelProvider.Factory {
@@ -57,7 +56,7 @@ class KodeinViewModelFactory(private val injector: DKodein,
5756
@MainThread
5857
inline fun <reified VM : ViewModel, A> A.viewModel(): Lazy<VM> where A : KodeinAware, A : FragmentActivity {
5958
return lazy {
60-
ViewModelProviders.of(this, direct.instance()).get(VM::class.java)
59+
ViewModelProvider(this, direct.instance()).get(VM::class.java)
6160
}
6261
}
6362

@@ -67,7 +66,7 @@ inline fun <reified VM : ViewModel, A> A.viewModel(): Lazy<VM> where A : KodeinA
6766
@MainThread
6867
inline fun <reified VM : ViewModel, F> F.viewModel(): Lazy<VM> where F : KodeinAware, F : Fragment {
6968
return lazy {
70-
ViewModelProviders.of(this, direct.instance()).get(VM::class.java)
69+
ViewModelProvider(this, direct.instance()).get(VM::class.java)
7170
}
7271
}
7372

@@ -80,7 +79,7 @@ inline fun <reified VM : ViewModel, F> F.viewModel(): Lazy<VM> where F : KodeinA
8079
@MainThread
8180
inline fun <reified T, reified VM : TypedViewModel<T>, A> A.viewModel(params: T): Lazy<VM> where A : KodeinAware, A : FragmentActivity {
8281
return lazy {
83-
ViewModelProviders.of(this, direct.instance(VM::class.java, params)).get(VM::class.java)
82+
ViewModelProvider(this, direct.instance(VM::class.java, params)).get(VM::class.java)
8483
}
8584
}
8685

@@ -93,7 +92,7 @@ inline fun <reified T, reified VM : TypedViewModel<T>, A> A.viewModel(params: T)
9392
@MainThread
9493
inline fun <reified T, reified VM : TypedViewModel<T>, F> F.viewModel(params: T): Lazy<VM> where F : KodeinAware, F : Fragment {
9594
return lazy {
96-
ViewModelProviders.of(this, direct.instance(VM::class.java, params)).get(VM::class.java)
95+
ViewModelProvider(this, direct.instance(VM::class.java, params)).get(VM::class.java)
9796
}
9897
}
9998

@@ -104,7 +103,7 @@ inline fun <reified T, reified VM : TypedViewModel<T>, F> F.viewModel(params: T)
104103
@MainThread
105104
inline fun <reified VM : ViewModel, F> F.sharedActivityViewModel(): Lazy<VM> where F : KodeinAware, F : Fragment {
106105
return lazy {
107-
ViewModelProviders.of(this.requireActivity(), direct.instance()).get(VM::class.java)
106+
ViewModelProvider(this.requireActivity(), direct.instance()).get(VM::class.java)
108107
}
109108
}
110109

@@ -118,7 +117,7 @@ inline fun <reified VM : ViewModel, F> F.sharedActivityViewModel(): Lazy<VM> whe
118117
@MainThread
119118
inline fun <reified T, reified VM : TypedViewModel<T>, F> F.sharedActivityViewModel(params: T): Lazy<VM> where F : KodeinAware, F : Fragment {
120119
return lazy {
121-
ViewModelProviders.of(this.requireActivity(), direct.instance(VM::class.java, params)).get(VM::class.java)
120+
ViewModelProvider(this.requireActivity(), direct.instance(VM::class.java, params)).get(VM::class.java)
122121
}
123122
}
124123

mini-kodein/build.gradle

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@ apply plugin: 'kotlin'
22
apply plugin: 'java-library'
33
apply from: "../jitpack.gradle"
44

5+
// Needed because of the Kodein dependency.
6+
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).all {
7+
kotlinOptions {
8+
jvmTarget = "1.8"
9+
}
10+
}
11+
512
dependencies {
613
api project(":mini-common")
714
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
815
implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"
916

10-
def kodein_version = "6.3.3"
17+
def kodein_version = "6.5.0"
1118
api "org.kodein.di:kodein-di-generic-jvm:$kodein_version"
1219
api "org.kodein.di:kodein-di-framework-android-x:$kodein_version"
1320
}

0 commit comments

Comments
 (0)