Skip to content

Commit

Permalink
Don't use the Jetbrains compose plugin in shared modules (#984)
Browse files Browse the repository at this point in the history
  • Loading branch information
hfhbd authored May 20, 2024
1 parent 73b14f5 commit b59d739
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
3 changes: 1 addition & 2 deletions clients/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.apple.*
plugins {
id("androidLibrary")
kotlin("multiplatform")
id("org.jetbrains.compose")
kotlin("plugin.compose")
id("app.cash.sqldelight")
}
Expand All @@ -25,7 +24,7 @@ kotlin {
androidTarget()
jvm("desktop")

js(IR) {
js {
browser()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ import app.cash.sqldelight.*
import kotlinx.datetime.*

object DateTimeAdapter : ColumnAdapter<Instant, String> {
override fun decode(databaseValue: String): Instant = databaseValue.toInstant()
override fun decode(databaseValue: String): Instant = Instant.parse(databaseValue)
override fun encode(value: Instant): String = value.toString()
}
6 changes: 5 additions & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ serialization = "1.6.3"
ktor = "2.3.11"
sqldelight = "2.0.2"
cloudkit = "0.1.0"
compose = "1.6.10-rc03"

[libraries]
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" }
compose-html-core = { module = "org.jetbrains.compose.html:html-core", version.ref = "compose" }

coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "coroutines" }
coroutines-swing = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-swing", version.ref = "coroutines" }
coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }
Expand Down Expand Up @@ -58,7 +62,7 @@ cloudkit-testing = { module = "app.softwork:cloudkitclient-testing", version.ref
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
compose = { id = "org.jetbrains.compose", version = "1.6.10-rc03" }
compose = { id = "org.jetbrains.compose", version.ref = "compose" }
sqldelight = { id = "app.cash.sqldelight", version.ref = "sqldelight" }
android = { id = "com.android.application", version = "8.4.0" }
jib = { id = "com.google.cloud.tools.jib", version = "3.4.2" }
Expand Down
3 changes: 1 addition & 2 deletions shared/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
plugins {
kotlin("multiplatform")
kotlin("plugin.serialization")
id("org.jetbrains.compose")
kotlin("plugin.compose")
}

Expand All @@ -24,7 +23,7 @@ kotlin {
sourceSets {
commonMain {
dependencies {
api(compose.runtime)
api(libs.compose.runtime)
api(libs.coroutines.core)
api(libs.serialization.json)
api(libs.datetime)
Expand Down

0 comments on commit b59d739

Please sign in to comment.