From 1a1f16f44aba242a52aed628ddd38bc2793ca406 Mon Sep 17 00:00:00 2001 From: arkon Date: Wed, 31 May 2023 22:48:13 -0400 Subject: [PATCH] Bump dependencies --- app/build.gradle.kts | 1 + .../eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt | 10 +++++++--- gradle/androidx.versions.toml | 2 +- gradle/kotlinx.versions.toml | 2 +- gradle/libs.versions.toml | 10 +++++----- presentation-widget/build.gradle.kts | 2 ++ 6 files changed, 17 insertions(+), 10 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 93c78c2928..9df023983d 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -218,6 +218,7 @@ dependencies { implementation(libs.injekt.core) // Image loading + implementation(platform(libs.coil.bom)) implementation(libs.bundles.coil) implementation(libs.subsamplingscaleimageview) { exclude(module = "image-decoder") diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt index adf033783f..f3c8cc60a9 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/coil/MangaCoverFetcher.kt @@ -222,18 +222,22 @@ class MangaCoverFetcher( } private fun readFromDiskCache(): DiskCache.Snapshot? { - return if (options.diskCachePolicy.readEnabled) diskCacheLazy.value[diskCacheKey] else null + return if (options.diskCachePolicy.readEnabled) { + diskCacheLazy.value.openSnapshot(diskCacheKey) + } else { + null + } } private fun writeToDiskCache( response: Response, ): DiskCache.Snapshot? { - val editor = diskCacheLazy.value.edit(diskCacheKey) ?: return null + val editor = diskCacheLazy.value.openEditor(diskCacheKey) ?: return null try { diskCacheLazy.value.fileSystem.write(editor.data) { response.body.source().readAll(this) } - return editor.commitAndGet() + return editor.commitAndOpenSnapshot() } catch (e: Exception) { try { editor.abort() diff --git a/gradle/androidx.versions.toml b/gradle/androidx.versions.toml index 25f1798d36..aafeabb3c7 100644 --- a/gradle/androidx.versions.toml +++ b/gradle/androidx.versions.toml @@ -1,5 +1,5 @@ [versions] -agp_version = "8.0.1" +agp_version = "8.0.2" lifecycle_version = "2.6.1" [libraries] diff --git a/gradle/kotlinx.versions.toml b/gradle/kotlinx.versions.toml index 2d3dd04b1e..a863511d90 100644 --- a/gradle/kotlinx.versions.toml +++ b/gradle/kotlinx.versions.toml @@ -1,6 +1,6 @@ [versions] kotlin_version = "1.8.21" -serialization_version = "1.5.0" +serialization_version = "1.5.1" xml_serialization_version = "0.86.0" [libraries] diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 703b3b8fd3..dbd1dbbeff 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,6 @@ [versions] -aboutlib_version = "10.6.2" +aboutlib_version = "10.7.0" okhttp_version = "5.0.0-alpha.11" -coil_version = "2.3.0" shizuku_version = "12.2.0" sqlite = "2.3.1" sqldelight = "1.5.5" @@ -41,9 +40,10 @@ preferencektx = "androidx.preference:preference-ktx:1.2.0" injekt-core = "com.github.inorichi.injekt:injekt-core:65b0440" -coil-core = { module = "io.coil-kt:coil", version.ref = "coil_version" } -coil-gif = { module = "io.coil-kt:coil-gif", version.ref = "coil_version" } -coil-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil_version" } +coil-bom = { module = "io.coil-kt:coil-bom", version = "2.4.0" } +coil-core = { module = "io.coil-kt:coil" } +coil-gif = { module = "io.coil-kt:coil-gif" } +coil-compose = { module = "io.coil-kt:coil-compose" } subsamplingscaleimageview = "com.github.tachiyomiorg:subsampling-scale-image-view:c8e2650" image-decoder = "com.github.tachiyomiorg:image-decoder:7879b45" diff --git a/presentation-widget/build.gradle.kts b/presentation-widget/build.gradle.kts index a468f8523e..9c5c0ec656 100644 --- a/presentation-widget/build.gradle.kts +++ b/presentation-widget/build.gradle.kts @@ -27,6 +27,8 @@ dependencies { implementation(androidx.glance) + implementation(platform(libs.coil.bom)) implementation(libs.coil.core) + api(libs.injekt.core) }