From 57bf81232b81abae8c1de5fd59fb3fc00f885246 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Muller?= Date: Mon, 25 Nov 2024 11:39:25 +0100 Subject: [PATCH] Upgrade to Coil 3.0.3 (#801) --- gradle/libs.versions.toml | 10 ++++-- gradle/wrapper/gradle-wrapper.properties | 2 +- pillarbox-demo-tv/build.gradle.kts | 7 +++- .../src/main/AndroidManifest.xml | 1 + .../pillarbox/demo/tv/DemoApplication.kt | 33 +++++++++++++++++++ .../demo/tv/ui/examples/ExamplesHome.kt | 2 +- .../pillarbox/demo/tv/ui/lists/ListsHome.kt | 2 +- .../tv/ui/player/compose/MediaMetadataView.kt | 2 +- pillarbox-demo/build.gradle.kts | 6 +++- .../srgssr/pillarbox/demo/DemoApplication.kt | 26 +++++++++++++-- .../ui/player/controls/MediaMetadataView.kt | 2 +- .../ui/showcases/layouts/ChapterShowcase.kt | 2 +- .../layouts/thumbnail/ThumbnailViewModel.kt | 16 ++++----- 13 files changed, 88 insertions(+), 23 deletions(-) create mode 100644 pillarbox-demo-tv/src/main/java/ch/srgssr/pillarbox/demo/tv/DemoApplication.kt diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index f94e1e707..4d170abca 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -16,7 +16,7 @@ androidx-test-ext-junit = "1.2.1" androidx-test-monitor = "1.7.2" androidx-test-runner = "1.6.2" androidx-tv-material = "1.0.0" -coil = "2.7.0" +coil = "3.0.3" comscore = "6.11.1" dependency-analysis-gradle-plugin = "2.4.2" detekt = "1.23.7" @@ -63,8 +63,12 @@ androidx-test-core = { module = "androidx.test:core", version.ref = "androidx-te androidx-test-monitor = { module = "androidx.test:monitor", version.ref = "androidx-test-monitor" } androidx-test-runner = { module = "androidx.test:runner", version.ref = "androidx-test-runner" } androidx-tv-material = { module = "androidx.tv:tv-material", version.ref = "androidx-tv-material" } -coil = { group = "io.coil-kt", name = "coil-compose", version.ref = "coil" } -coil-base = { module = "io.coil-kt:coil-compose-base", version.ref = "coil" } +coil = { group = "io.coil-kt.coil3", name = "coil", version.ref = "coil" } +coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" } +coil-core = { group = "io.coil-kt.coil3", name = "coil-core", version.ref = "coil" } +coil-network-cache-control = { group = "io.coil-kt.coil3", name = "coil-network-cache-control", version.ref = "coil" } +coil-network-core = { group = "io.coil-kt.coil3", name = "coil-network-core", version.ref = "coil" } +coil-network-okhttp = { group = "io.coil-kt.coil3", name = "coil-network-okhttp", version.ref = "coil" } dokka-gradle-plugin = { module = "org.jetbrains.dokka:dokka-gradle-plugin", version.ref = "dokka" } json = { module = "org.json:json", version.ref = "json" } kotlin-gradle-plugin = { module = "org.jetbrains.kotlin:kotlin-gradle-plugin", version.ref = "kotlin" } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 7cf748e74..c1d5e0185 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME diff --git a/pillarbox-demo-tv/build.gradle.kts b/pillarbox-demo-tv/build.gradle.kts index c9a27220e..892f6dba2 100644 --- a/pillarbox-demo-tv/build.gradle.kts +++ b/pillarbox-demo-tv/build.gradle.kts @@ -41,10 +41,15 @@ dependencies { implementation(libs.androidx.paging.compose) implementation(libs.androidx.tv.material) implementation(libs.coil) - implementation(libs.coil.base) + implementation(libs.coil.compose) + implementation(libs.coil.core) + implementation(libs.coil.network.cache.control) + implementation(libs.coil.network.core) + implementation(libs.coil.network.okhttp) implementation(libs.kotlin.stdlib) implementation(libs.kotlinx.coroutines.core) implementation(libs.kotlinx.serialization.core) + implementation(libs.okhttp) implementation(libs.srg.data) implementation(libs.srg.dataprovider.retrofit) diff --git a/pillarbox-demo-tv/src/main/AndroidManifest.xml b/pillarbox-demo-tv/src/main/AndroidManifest.xml index 40291e0f5..ac6094667 100644 --- a/pillarbox-demo-tv/src/main/AndroidManifest.xml +++ b/pillarbox-demo-tv/src/main/AndroidManifest.xml @@ -12,6 +12,7 @@ android:required="false" /> - val bitmap = (result as BitmapDrawable).bitmap + val bitmap = (result as BitmapImage).bitmap onComplete(bitmap) } .build()