Skip to content

Commit 370f64d

Browse files
authored
Merge pull request #31 from joreilly/dependency_updates
update dependencies
2 parents 46b3c2c + 2f17e00 commit 370f64d

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ The app uses the following multiplatform dependencies in its implementation:
2121
- [Compose Navigation](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-navigation-routing.html)
2222
- [Ktor](https://ktor.io/) for networking
2323
- [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) for JSON handling
24-
- [Kamel](https://github.com/Kamel-Media/Kamel) for image loading
24+
- [Coil](https://github.com/coil-kt/coil) for image loading
2525
- [Koin](https://github.com/InsertKoinIO/koin) for dependency injection
2626

2727
> These are just some of the possible libraries to use for these tasks with Kotlin Multiplatform, and their usage here isn't a strong recommendation for these specific libraries over the available alternatives. You can find a wide variety of curated multiplatform libraries in the [kmp-awesome](https://github.com/terrakok/kmp-awesome) repository.

composeApp/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ kotlin {
4949
implementation(libs.ktor.client.content.negotiation)
5050
implementation(libs.ktor.serialization.kotlinx.json)
5151

52-
implementation(libs.kamel)
52+
implementation(libs.coil.compose)
53+
implementation(libs.coil.network.ktor)
5354
implementation(libs.koin.core)
5455
implementation(libs.koin.compose.viewmodel)
5556
implementation(libs.navigation.compose)

composeApp/src/commonMain/kotlin/com/jetbrains/kmpapp/screens/detail/DetailScreen.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,9 @@ import androidx.compose.ui.text.buildAnnotatedString
3333
import androidx.compose.ui.text.font.FontWeight
3434
import androidx.compose.ui.text.withStyle
3535
import androidx.compose.ui.unit.dp
36+
import coil3.compose.AsyncImage
3637
import com.jetbrains.kmpapp.data.MuseumObject
3738
import com.jetbrains.kmpapp.screens.EmptyScreenContent
38-
import io.kamel.image.KamelImage
39-
import io.kamel.image.asyncPainterResource
4039
import kmp_app_template.composeapp.generated.resources.Res
4140
import kmp_app_template.composeapp.generated.resources.back
4241
import kmp_app_template.composeapp.generated.resources.label_artist
@@ -88,8 +87,8 @@ private fun ObjectDetails(
8887
.verticalScroll(rememberScrollState())
8988
.padding(paddingValues)
9089
) {
91-
KamelImage(
92-
resource = asyncPainterResource(data = obj.primaryImageSmall),
90+
AsyncImage(
91+
model = obj.primaryImageSmall,
9392
contentDescription = obj.title,
9493
contentScale = ContentScale.FillWidth,
9594
modifier = Modifier

composeApp/src/commonMain/kotlin/com/jetbrains/kmpapp/screens/list/ListScreen.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,9 @@ import androidx.compose.ui.graphics.Color
2828
import androidx.compose.ui.layout.ContentScale
2929
import androidx.compose.ui.text.font.FontWeight
3030
import androidx.compose.ui.unit.dp
31+
import coil3.compose.AsyncImage
3132
import com.jetbrains.kmpapp.data.MuseumObject
3233
import com.jetbrains.kmpapp.screens.EmptyScreenContent
33-
import io.kamel.image.KamelImage
34-
import io.kamel.image.asyncPainterResource
3534
import org.koin.compose.viewmodel.koinViewModel
3635

3736
@Composable
@@ -88,8 +87,8 @@ private fun ObjectFrame(
8887
.padding(8.dp)
8988
.clickable { onClick() }
9089
) {
91-
KamelImage(
92-
resource = asyncPainterResource(data = obj.primaryImageSmall),
90+
AsyncImage(
91+
model = obj.primaryImageSmall,
9392
contentDescription = obj.title,
9493
contentScale = ContentScale.Crop,
9594
modifier = Modifier

gradle/libs.versions.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
[versions]
2-
agp = "8.6.0"
3-
androidx-activityCompose = "1.9.2"
4-
androidx-ui-tooling = "1.7.2"
5-
compose-multiplatform = "1.6.11"
6-
kamel = "0.9.5"
2+
agp = "8.6.1"
3+
androidx-activityCompose = "1.9.3"
4+
androidx-ui-tooling = "1.7.4"
5+
coil = "3.0.0-rc02"
6+
compose-multiplatform = "1.7.0"
77
koin = "4.0.0"
8-
kotlin = "2.0.20"
9-
ktor = "2.3.12"
8+
kotlin = "2.0.21"
9+
ktor = "3.0.0"
1010
navigationCompose = "2.8.0-alpha10"
1111

1212
[libraries]
1313
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
1414
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-ui-tooling" }
1515
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-ui-tooling" }
16-
kamel = { module = "media.kamel:kamel-image", version.ref = "kamel" }
16+
coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" }
17+
coil-network-ktor = { group = "io.coil-kt.coil3", name = "coil-network-ktor3", version.ref = "coil" }
1718
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
1819
koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin" }
1920
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }

0 commit comments

Comments
 (0)