Skip to content

Commit 8d2a943

Browse files
5peak2menathan3d
authored andcommitted
Migrate to org.jetbrains.kotlin.multiplatform plugin.
1 parent 0ea6085 commit 8d2a943

File tree

19 files changed

+22
-22
lines changed

19 files changed

+22
-22
lines changed

ruler-frontend-tests/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ tasks.withType<Test> {
3232
useJUnitPlatform()
3333

3434
// Make development report available
35-
dependsOn(":ruler-frontend:browserDevelopmentWebpack")
35+
dependsOn(":ruler-frontend:jsBrowserDevelopmentWebpack")
3636
}
3737

3838
kotlin {

ruler-frontend/build.gradle.kts

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
plugins {
18-
id("org.jetbrains.kotlin.js")
18+
id("org.jetbrains.kotlin.multiplatform")
1919
id("io.gitlab.arturbosch.detekt")
2020
}
2121

@@ -33,39 +33,39 @@ kotlin {
3333
}
3434

3535
dependencies {
36-
implementation(project(":ruler-models"))
36+
"jsMainImplementation"(project(":ruler-models"))
3737

38-
implementation(Dependencies.KOTLIN_REACT)
39-
implementation(Dependencies.KOTLIN_REACT_DOM)
40-
implementation(Dependencies.KOTLIN_REACT_ROUTER)
41-
implementation(Dependencies.KOTLIN_JS_EXTENSIONS)
42-
implementation(Dependencies.KOTLINX_SERIALIZATION_JSON)
38+
"jsMainImplementation"(Dependencies.KOTLIN_REACT)
39+
"jsMainImplementation"(Dependencies.KOTLIN_REACT_DOM)
40+
"jsMainImplementation"(Dependencies.KOTLIN_REACT_ROUTER)
41+
"jsMainImplementation"(Dependencies.KOTLIN_JS_EXTENSIONS)
42+
"jsMainImplementation"(Dependencies.KOTLINX_SERIALIZATION_JSON)
4343

44-
implementation(npm(Dependencies.REACT, Dependencies.Versions.REACT))
45-
implementation(npm(Dependencies.REACT_DOM, Dependencies.Versions.REACT))
46-
implementation(npm(Dependencies.BOOTSTRAP, Dependencies.Versions.BOOTSTRAP))
47-
implementation(npm(Dependencies.APEX_CHARTS, Dependencies.Versions.APEX_CHARTS))
44+
"jsMainImplementation"(npm(Dependencies.REACT, Dependencies.Versions.REACT))
45+
"jsMainImplementation"(npm(Dependencies.REACT_DOM, Dependencies.Versions.REACT))
46+
"jsMainImplementation"(npm(Dependencies.BOOTSTRAP, Dependencies.Versions.BOOTSTRAP))
47+
"jsMainImplementation"(npm(Dependencies.APEX_CHARTS, Dependencies.Versions.APEX_CHARTS))
4848

49-
testImplementation(kotlin("test-js"))
49+
"jsTestImplementation"(kotlin("test-js"))
5050
}
5151

52-
val browserDist by configurations.creating {
52+
val browserDist: Configuration by configurations.creating {
5353
isCanBeConsumed = true
5454
isCanBeResolved = false
5555
}
5656

5757
artifacts {
58-
add(browserDist.name, tasks.named("browserDistribution").map { it.outputs.files.files.single() })
58+
add(browserDist.name, tasks.named("jsBrowserDistribution").map { it.outputs.files.files.single() })
5959
}
6060

61-
tasks.named("browserDevelopmentRun") {
62-
dependsOn("developmentExecutableCompileSync")
61+
tasks.named("jsBrowserDevelopmentRun") {
62+
dependsOn("jsDevelopmentExecutableCompileSync")
6363
}
6464

65-
tasks.named("browserDevelopmentWebpack") {
66-
dependsOn("productionExecutableCompileSync")
65+
tasks.named("jsBrowserDevelopmentWebpack") {
66+
dependsOn("jsProductionExecutableCompileSync")
6767
}
6868

69-
tasks.named("browserProductionWebpack") {
70-
dependsOn("developmentExecutableCompileSync")
69+
tasks.named("jsBrowserProductionWebpack") {
70+
dependsOn("jsDevelopmentExecutableCompileSync")
7171
}

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/Formatting.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/Formatting.kt

File renamed without changes.

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/Main.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/Main.kt

File renamed without changes.

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/binding/ApexCharts.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/binding/ApexCharts.kt

File renamed without changes.

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/chart/BarChartConfig.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/chart/BarChartConfig.kt

File renamed without changes.

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/chart/ChartConfig.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/chart/ChartConfig.kt

File renamed without changes.

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/chart/ChartUtils.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/chart/ChartUtils.kt

File renamed without changes.

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/components/Breakdown.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/components/Breakdown.kt

File renamed without changes.

ruler-frontend/src/main/kotlin/com/spotify/ruler/frontend/components/Common.kt renamed to ruler-frontend/src/jsMain/kotlin/com/spotify/ruler/frontend/components/Common.kt

File renamed without changes.

0 commit comments

Comments
 (0)