From 8949b4764de9aa7f9f069fcdea5c9b3621d05fad Mon Sep 17 00:00:00 2001 From: Christophe Beyls Date: Fri, 15 Jul 2022 16:39:06 +0200 Subject: [PATCH] update Gradle plugin, Kotlin and misc libraries --- app/build.gradle | 28 ++++++++++--------- .../be/digitalia/fosdem/db/RoomDatabaseExt.kt | 2 +- build.gradle | 6 ++-- gradle/wrapper/gradle-wrapper.properties | 2 +- 4 files changed, 20 insertions(+), 18 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index fca69d4..59d1a34 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -43,9 +43,11 @@ android { } packagingOptions { - exclude 'androidsupportmultidexversion.txt' - exclude 'DebugProbesKt.bin' - exclude 'kotlin-tooling-metadata.json' + resources.excludes += [ + 'androidsupportmultidexversion.txt', + 'DebugProbesKt.bin', + 'kotlin-tooling-metadata.json' + ] } } } @@ -58,7 +60,7 @@ android { kotlinOptions { freeCompilerArgs = [ - '-Xopt-in=kotlin.RequiresOptIn' + '-opt-in=kotlin.RequiresOptIn' ] jvmTarget = "1.8" } @@ -97,21 +99,21 @@ afterEvaluate { } dependencies { - def lifecycle_version = "2.4.1" + def lifecycle_version = "2.5.0" def room_version = "2.4.2" def okhttp_version = "3.12.13" - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.6' implementation "androidx.multidex:multidex:2.0.1" implementation "com.google.dagger:hilt-android:$hilt_version" kapt "com.google.dagger:hilt-compiler:$hilt_version" - implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0' - implementation 'androidx.core:core-ktx:1.7.0' - implementation 'androidx.activity:activity-ktx:1.4.0' - implementation 'androidx.fragment:fragment-ktx:1.4.1' - implementation 'androidx.appcompat:appcompat:1.4.1' - implementation 'com.google.android.material:material:1.4.0' + implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' + implementation 'androidx.core:core-ktx:1.8.0' + implementation 'androidx.activity:activity-ktx:1.5.0' + implementation 'androidx.fragment:fragment-ktx:1.5.0' + implementation 'androidx.appcompat:appcompat:1.4.2' + implementation 'com.google.android.material:material:1.6.1' implementation 'androidx.coordinatorlayout:coordinatorlayout:1.2.0' implementation 'androidx.recyclerview:recyclerview:1.2.1' implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01' @@ -129,7 +131,7 @@ dependencies { implementation("com.squareup.okhttp3:okhttp-tls:$okhttp_version") { exclude group: 'org.bouncycastle', module: 'bcprov-jdk15on' } - implementation 'com.squareup.okio:okio:3.0.0' + implementation 'com.squareup.okio:okio:3.2.0' implementation 'com.squareup.moshi:moshi:1.13.0' implementation 'com.github.chrisbanes:PhotoView:2.3.0' } diff --git a/app/src/main/java/be/digitalia/fosdem/db/RoomDatabaseExt.kt b/app/src/main/java/be/digitalia/fosdem/db/RoomDatabaseExt.kt index bec4f4b..6ce0ee7 100644 --- a/app/src/main/java/be/digitalia/fosdem/db/RoomDatabaseExt.kt +++ b/app/src/main/java/be/digitalia/fosdem/db/RoomDatabaseExt.kt @@ -10,7 +10,7 @@ import kotlinx.coroutines.flow.update fun RoomDatabase.createVersionFlow(vararg tables: String): StateFlow { val stateFlow = MutableStateFlow(0) invalidationTracker.addObserver(object : InvalidationTracker.Observer(tables) { - override fun onInvalidated(tables: MutableSet) { + override fun onInvalidated(tables: Set) { stateFlow.update { it + 1 } } }) diff --git a/build.gradle b/build.gradle index 6709287..13d1579 100644 --- a/build.gradle +++ b/build.gradle @@ -1,15 +1,15 @@ // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { ext { - kotlin_version = '1.6.10' - hilt_version = '2.41' + kotlin_version = '1.7.10' + hilt_version = '2.42' } repositories { google() mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:7.1.2' + classpath 'com.android.tools.build:gradle:7.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "com.google.dagger:hilt-android-gradle-plugin:$hilt_version" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dd5764f..bb05b73 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-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip