Skip to content

Commit

Permalink
update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
joreilly committed Oct 28, 2024
1 parent 46b3c2c commit 0d4237c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ The app uses the following multiplatform dependencies in its implementation:
- [Compose Navigation](https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-navigation-routing.html)
- [Ktor](https://ktor.io/) for networking
- [kotlinx.serialization](https://github.com/Kotlin/kotlinx.serialization) for JSON handling
- [Kamel](https://github.com/Kamel-Media/Kamel) for image loading
- [Coil](https://github.com/coil-kt/coil) for image loading
- [Koin](https://github.com/InsertKoinIO/koin) for dependency injection

> 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.
3 changes: 2 additions & 1 deletion composeApp/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ kotlin {
implementation(libs.ktor.client.content.negotiation)
implementation(libs.ktor.serialization.kotlinx.json)

implementation(libs.kamel)
implementation(libs.coil.compose)
implementation(libs.coil.network.ktor)
implementation(libs.koin.core)
implementation(libs.koin.compose.viewmodel)
implementation(libs.navigation.compose)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,9 @@ import androidx.compose.ui.text.buildAnnotatedString
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.text.withStyle
import androidx.compose.ui.unit.dp
import coil3.compose.AsyncImage
import com.jetbrains.kmpapp.data.MuseumObject
import com.jetbrains.kmpapp.screens.EmptyScreenContent
import io.kamel.image.KamelImage
import io.kamel.image.asyncPainterResource
import kmp_app_template.composeapp.generated.resources.Res
import kmp_app_template.composeapp.generated.resources.back
import kmp_app_template.composeapp.generated.resources.label_artist
Expand Down Expand Up @@ -88,8 +87,8 @@ private fun ObjectDetails(
.verticalScroll(rememberScrollState())
.padding(paddingValues)
) {
KamelImage(
resource = asyncPainterResource(data = obj.primaryImageSmall),
AsyncImage(
model = obj.primaryImageSmall,
contentDescription = obj.title,
contentScale = ContentScale.FillWidth,
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import coil3.compose.AsyncImage
import com.jetbrains.kmpapp.data.MuseumObject
import com.jetbrains.kmpapp.screens.EmptyScreenContent
import io.kamel.image.KamelImage
import io.kamel.image.asyncPainterResource
import org.koin.compose.viewmodel.koinViewModel

@Composable
Expand Down Expand Up @@ -88,8 +87,8 @@ private fun ObjectFrame(
.padding(8.dp)
.clickable { onClick() }
) {
KamelImage(
resource = asyncPainterResource(data = obj.primaryImageSmall),
AsyncImage(
model = obj.primaryImageSmall,
contentDescription = obj.title,
contentScale = ContentScale.Crop,
modifier = Modifier
Expand Down
17 changes: 9 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
[versions]
agp = "8.6.0"
androidx-activityCompose = "1.9.2"
androidx-ui-tooling = "1.7.2"
compose-multiplatform = "1.6.11"
kamel = "0.9.5"
agp = "8.6.1"
androidx-activityCompose = "1.9.3"
androidx-ui-tooling = "1.7.4"
coil = "3.0.0-rc01"
compose-multiplatform = "1.7.0"
koin = "4.0.0"
kotlin = "2.0.20"
ktor = "2.3.12"
kotlin = "2.0.21"
ktor = "3.0.0"
navigationCompose = "2.8.0-alpha10"

[libraries]
androidx-activity-compose = { module = "androidx.activity:activity-compose", version.ref = "androidx-activityCompose" }
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref = "androidx-ui-tooling" }
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview", version.ref = "androidx-ui-tooling" }
kamel = { module = "media.kamel:kamel-image", version.ref = "kamel" }
coil-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coil" }
coil-network-ktor = { group = "io.coil-kt.coil3", name = "coil-network-ktor3", version.ref = "coil" }
koin-core = { module = "io.insert-koin:koin-core", version.ref = "koin" }
koin-compose-viewmodel = { module = "io.insert-koin:koin-compose-viewmodel", version.ref = "koin" }
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktor" }
Expand Down

0 comments on commit 0d4237c

Please sign in to comment.