Skip to content

Commit

Permalink
Merge pull request #563 from skydoves/kmp/configure
Browse files Browse the repository at this point in the history
Reconfigure coil3 dependencies and support targets
  • Loading branch information
skydoves authored Sep 24, 2024
2 parents 91fd618 + 0727033 commit a6e1503
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ internal fun Project.configureComposeMultiplatform(
androidTarget { publishLibraryVariants("release") }
jvm("desktop")

@OptIn(ExperimentalWasmDsl::class)
wasmJs {
browser {
testTask {
Expand Down
22 changes: 16 additions & 6 deletions coil3/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ kotlin {
api(project(":landscapist"))
api(libs.coil3)
api(libs.coil3.network.ktor3)
api(libs.ktor.core)
api(libs.kotlinx.serialization.json)

implementation(compose.ui)
implementation(compose.runtime)
Expand All @@ -58,21 +58,31 @@ kotlin {
}
}

val androidMain by getting {
androidMain {
dependencies {
implementation(libs.androidx.core.ktx)
api(libs.coil3.network.okhttp)
api(libs.coil.gif)
api(libs.coil.video)
api(libs.androidx.core.ktx)
}
}

val jvmMain by getting {
appleMain {
dependencies {
api(libs.coil3.network.ktor3)
api(libs.ktor.engine.darwin)
}
}

jvmMain {
dependencies {
api(libs.ktor.okhttp)
}
}

val iosMain by getting {
named("wasmJsMain") {
dependencies {
api(libs.ktor.engine.darwin)
api(libs.coil3.network.ktor3)
}
}
}
Expand Down
5 changes: 5 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ androidxJunit = "1.2.1"
androidxMacroBenchmark = "1.4.0-alpha01"
androidxProfileinstaller = "1.4.0"
androidxUiAutomator = "2.3.0"
kotlinxSerializationJson = "1.7.3"
jetbrains-compose = "1.6.11"
glide = "4.16.0"
fresco = "3.2.0"
Expand Down Expand Up @@ -65,13 +66,17 @@ fresco-websupport = { group = "com.facebook.fresco", name = "webpsupport", versi
fresco-middleware = { group = "com.facebook.fresco", name = "middleware", version.ref = "fresco" }
coil = { group = "io.coil-kt", name = "coil", version.ref = "coil" }
coil-gif = { group = "io.coil-kt", name = "coil-gif", version.ref = "coil" }
coil-video = { group = "io.coil-kt", name = "coil-video", version.ref = "coil" }
coil-svg = { group = "io.coil-kt", name = "coil-svg", version.ref = "coil" }
coil3 = { group = "io.coil-kt.coil3", name = "coil", version.ref = "coil3" }
coil3-network-ktor2 = { group = "io.coil-kt.coil3", name = "coil-network-ktor2", version.ref = "coil3" }
coil3-network-ktor3 = { group = "io.coil-kt.coil3", name = "coil-network-ktor3", version.ref = "coil3" }
coil3-network-okhttp = { group = "io.coil-kt.coil3", name = "coil-network-okhttp", version.ref = "coil3" }
ktor-core = { group = "io.ktor", name = "ktor-client-core", version.ref = "ktor" }
ktor-okhttp = { group = "io.ktor", name = "ktor-client-okhttp", version.ref = "ktor" }
ktor-engine-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktor" }
ktor-engine-js = { module = "io.ktor:ktor-client-js", version.ref = "ktor" }
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }

# Dependencies of the included build-logic
android-gradlePlugin = { group = "com.android.tools.build", name = "gradle", version.ref = "androidGradlePlugin" }
Expand Down

0 comments on commit a6e1503

Please sign in to comment.