Skip to content

Commit

Permalink
migrate to kjs plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
mpetuska committed Jul 4, 2023
1 parent 0b2df55 commit e61eca6
Show file tree
Hide file tree
Showing 259 changed files with 3,067 additions and 42 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
plugins {
id("convention.common")
kotlin("multiplatform")
kotlin("js")
id("convention.dokka")
id("convention.compose")
}

kotlin {
explicitApi()
js(IR) {
js {
useCommonJs()
browser {
commonWebpackConfig {
Expand All @@ -20,7 +20,7 @@ kotlin {
}
compilations["test"].defaultSourceSet {
dependencies {
implementation(compose.html.testUtils)
// implementation(compose.html.testUtils)
implementation(libs.kotlin.test)
implementation(libs.kotest.assertions.core)
}
Expand Down
4 changes: 4 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ versions-update = "0.8.0"

[libraries]
compose-routing = "app.softwork:routing-compose:0.2.12"
compose-html-core = { module = "org.jetbrains.compose.html:html-core", version.ref = "compose" }
compose-html-svg = { module = "org.jetbrains.compose.html:html-svg", version.ref = "compose" }
compose-runtime = { module = "org.jetbrains.compose.runtime:runtime", version.ref = "compose" }
detekt-formatting = { module = "io.gitlab.arturbosch.detekt:detekt-formatting", version.ref = "detekt" }
kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
kotlin-stdlib = { module = "org.jetbrains.kotlin:kotlin-stdlib", version.ref = "kotlin" }
Expand All @@ -33,5 +36,6 @@ plugin-versions-update = { module = "nl.littlerobots.vcu:plugin", version.ref =
[plugins]
build-config = { id = "com.github.gmazzo.buildconfig", version.ref = "build-config" }
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
kotlin-js = { id = "org.jetbrains.kotlin.js", version.ref = "kotlin" }
versions = { id = "com.github.ben-manes.versions", version.ref = "versions" }
versions-update = { id = "nl.littlerobots.version-catalog-update", version.ref = "versions-update" }
6 changes: 3 additions & 3 deletions katalog/katalog-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ plugins {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.runtime)
api(compose.html.core)
api(libs.compose.runtime)
api(libs.compose.html.core)
implementation(libs.compose.routing)
}
}
Expand Down
2 changes: 1 addition & 1 deletion kmdc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "Compose Multiplatform Kotlin/JS wrappers for @material/material-c

kotlin {
sourceSets {
jsMain {
main {
dependencies {
subprojects.forEach(::api)
}
Expand Down
2 changes: 1 addition & 1 deletion kmdc/kmdc-banner/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("button"))
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions kmdc/kmdc-base/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.runtime)
api(compose.html.core)
api(libs.compose.runtime)
api(libs.compose.html.core)
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions kmdc/kmdc-button/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.html.svg)
api(libs.compose.html.svg)
api(kmdc("ripple"))
api(kmdc("touch-target"))
api(kmdc("elevation"))
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-card/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("button"))
api(kmdc("icon-button"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions kmdc/kmdc-checkbox/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.html.svg)
api(libs.compose.html.svg)
api(kmdc("form-field"))
api(kmdc("touch-target"))
}
Expand Down
4 changes: 2 additions & 2 deletions kmdc/kmdc-chips/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.html.svg)
api(libs.compose.html.svg)
api(kmdc("touch-target"))
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions kmdc/kmdc-circular-progress/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.html.svg)
api(libs.compose.html.svg)
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion kmdc/kmdc-data-table/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("checkbox"))
api(kmdc("linear-progress"))
Expand Down
2 changes: 1 addition & 1 deletion kmdc/kmdc-dialog/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("button"))
api(kmdc("icon-button"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-fab/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("ripple"))
api(kmdc("touch-target"))
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-form-field/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("ripple"))
}
Expand Down
4 changes: 2 additions & 2 deletions kmdc/kmdc-icon-button/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.html.svg)
api(libs.compose.html.svg)
api(kmdc("ripple"))
}
}
Expand Down
2 changes: 1 addition & 1 deletion kmdc/kmdc-list/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("ripple"))
api(kmdc("radio"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-menu/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("list"))
api(kmdc("menu-surface"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-radio/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("form-field"))
api(kmdc("touch-target"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-segmented-button/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("ripple"))
}
Expand Down
4 changes: 2 additions & 2 deletions kmdc/kmdc-select/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(compose.html.svg)
api(libs.compose.html.svg)
api(kmdc("list"))
api(kmdc("menu"))
api(kmdc("line-ripple"))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-snackbar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("button"))
api(kmdc("icon-button"))
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions kmdc/kmdc-switch/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("ripple"))
api(compose.html.svg)
api(libs.compose.html.svg)
}
}
}
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-textfield/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("ripple"))
api(kmdc("line-ripple"))
Expand Down
2 changes: 1 addition & 1 deletion kmdc/kmdc-tooltip/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("ripple"))
api(kmdc("button"))
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion kmdc/kmdc-top-app-bar/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ kmdc {

kotlin {
sourceSets {
jsMain {
main {
dependencies {
api(kmdc("icon-button"))
}
Expand Down
2 changes: 1 addition & 1 deletion kmdcx/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description = "All KMDC extensions"

kotlin {
sourceSets {
jsMain {
main {
dependencies {
subprojects.forEach(::api)
}
Expand Down
File renamed without changes.
Loading

0 comments on commit e61eca6

Please sign in to comment.