Skip to content

Commit

Permalink
fix/cleanup coil3 dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
joreilly committed Sep 12, 2024
1 parent 317c4f2 commit 5bffe46
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 25 deletions.
3 changes: 2 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,9 @@ dependencies {
implementation(libs.androidx.compose.material3.adaptive.navigation)
implementation(libs.androidx.compose.material3.adaptive.navigation.suite)

implementation(libs.coil3.compose)
implementation(libs.coil3.network.ktor)

implementation(libs.coilCompose)
implementation(libs.glance.appwidget)

implementation(libs.koin.core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.unit.dp
import coil.compose.AsyncImage
import coil3.compose.AsyncImage
import com.surrus.common.remote.Assignment
import com.surrus.peopleinspace.ui.PurpleGray50

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
import androidx.lifecycle.compose.collectAsStateWithLifecycle
import coil.compose.AsyncImage
import coil3.compose.AsyncImage
import com.surrus.common.remote.Assignment
import com.surrus.common.viewmodel.PersonListUiState
import com.surrus.common.viewmodel.PersonListViewModel
Expand Down
6 changes: 3 additions & 3 deletions compose-desktop/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
kotlin("jvm")
alias(libs.plugins.compose.compiler)
Expand All @@ -12,7 +10,9 @@ version = "1.0-SNAPSHOT"

dependencies {
implementation(compose.desktop.currentOs)
implementation(libs.imageLoader)
implementation(libs.coil3.compose)
implementation(libs.coil3.network.ktor)

implementation(project(":common"))
}

Expand Down
9 changes: 5 additions & 4 deletions compose-desktop/src/main/kotlin/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import androidx.compose.ui.unit.sp
import androidx.compose.ui.window.Window
import androidx.compose.ui.window.application
import androidx.compose.ui.window.rememberWindowState
import com.seiko.imageloader.rememberImagePainter
import coil3.compose.AsyncImage
import com.surrus.common.di.initKoin
import com.surrus.common.remote.Assignment
import com.surrus.common.remote.PeopleInSpaceApi
Expand Down Expand Up @@ -116,9 +116,10 @@ fun PersonDetailsView(person: Assignment) {

val personImageUrl = person.personImageUrl
personImageUrl?.let {
Image(
painter = rememberImagePainter(personImageUrl),
modifier = Modifier.size(240.dp), contentDescription = person.name
AsyncImage(
modifier = Modifier.size(240.dp),
model = personImageUrl,
contentDescription = person.name
)
}
Spacer(modifier = Modifier.size(24.dp))
Expand Down
12 changes: 5 additions & 7 deletions compose-web/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig

plugins {
kotlin("multiplatform")
id("kotlinx-serialization")
Expand Down Expand Up @@ -30,15 +28,15 @@ kotlin {
implementation(compose.material3)
implementation(compose.components.resources)

implementation("io.coil-kt.coil3:coil-compose:3.0.0-alpha10")
implementation("io.coil-kt.coil3:coil-network-ktor:3.0.0-alpha08")
implementation(libs.coil3.compose)
implementation(libs.coil3.network.ktor)

implementation(libs.kotlinx.coroutines)
implementation(libs.kotlinx.serialization)

implementation("io.ktor:ktor-client-core:3.0.0-beta-2")
implementation("io.ktor:ktor-serialization-kotlinx-json:3.0.0-beta-2")
implementation("io.ktor:ktor-client-content-negotiation:3.0.0-beta-2")
implementation("io.ktor:ktor-client-core:3.0.0-rc-1")
implementation("io.ktor:ktor-serialization-kotlinx-json:3.0.0-rc-1")
implementation("io.ktor:ktor-client-content-negotiation:3.0.0-rc-1")
}
}
}
Expand Down
20 changes: 12 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,33 @@
kotlin = "2.0.20"
ksp = "2.0.20-1.0.24"

compose-multiplatform = "1.6.11"
compose-multiplatform = "1.7.0-beta02"
composeUiTooling = "1.4.0"
coroutines = "1.9.0-RC"
kotlinxSerialization = "1.7.1"
androidGradlePlugin = "8.5.2"
koin = "3.6.0-Beta4"
koinCompose = "3.6.0-Beta4"
koinComposeMultiplatform = "1.2.0-Beta4"
ktor = "3.0.0-beta-2"
ktor = "3.0.0-rc-1"
osmdroidAndroid = "6.1.18"
osmAndroidCompose = "0.0.5"
slf4j = "2.0.13"
sqlDelight = "2.0.2"

androidxActivity = "1.9.1"
androidxComposeBom = "2024.09.00"
androidxActivity = "1.9.2"
androidxComposeBom = "2024.09.01"
material3-adaptive = "1.0.0"
material3-adaptive-navigation-suite = "1.3.0"
androidxNavigationCompose = "2.8.0"
uiToolingPreview = "1.7.0"
uiToolingPreview = "1.7.1"
wearCompose = "1.4.0"
androidxLifecycle = "2.8.5"
androidxLifecycleKMP = "2.8.0"
imageLoader = "1.7.8"
androidxLifecycleKMP = "2.8.2"

coilCompose = "2.7.0"
coilCompose3 = "3.0.0-alpha10"

horologist = "0.6.12"
glanceWearTiles = "1.0.0-alpha05"
glanceAppWidget = "1.0.0"
Expand Down Expand Up @@ -87,7 +88,6 @@ androidx-tracing = "androidx.tracing:tracing:1.2.0"
splash-screen = "androidx.core:core-splashscreen:1.0.1"
metrics = "androidx.metrics:metrics-performance:1.0.0-beta01"

imageLoader = { module = "io.github.qdsfdhvh:image-loader", version.ref = "imageLoader" }
osmdroidAndroid = { module = "org.osmdroid:osmdroid-android", version.ref = "osmdroidAndroid" }
osm-android-compose = { module = "tech.utsmankece:osm-android-compose", version.ref = "osmAndroidCompose" }

Expand All @@ -96,6 +96,10 @@ wear-compose-material = { module = "androidx.wear.compose:compose-material", ver
wear-compose-navigation = { module = "androidx.wear.compose:compose-navigation", version.ref = "wearCompose" }

coilCompose = { group = "io.coil-kt", name = "coil-compose", version.ref = "coilCompose" }
coil3-compose = { group = "io.coil-kt.coil3", name = "coil-compose", version.ref = "coilCompose3" }
coil3-network-ktor = { group = "io.coil-kt.coil3", name = "coil-network-ktor3", version.ref = "coilCompose3" }


horologist-compose-layout = { module = "com.google.android.horologist:horologist-compose-layout", version.ref = "horologist" }

glance-tiles = { module = "androidx.glance:glance-wear-tiles", version.ref = "glanceWearTiles" }
Expand Down

0 comments on commit 5bffe46

Please sign in to comment.