Skip to content

Commit 87cc920

Browse files
igoriakovlevilya-g
authored andcommitted
Move js files into commonJs source set
1 parent 53ffd13 commit 87cc920

12 files changed

+19
-3
lines changed

core/build.gradle.kts

+19-3
Original file line numberDiff line numberDiff line change
@@ -193,20 +193,29 @@ kotlin {
193193
}
194194
}
195195

196-
val jsMain by getting {
196+
val commonJsMain by creating {
197+
dependsOn(commonMain.get())
197198
dependencies {
198-
api("org.jetbrains.kotlin:kotlin-stdlib-js")
199199
api("org.jetbrains.kotlinx:kotlinx-serialization-core:$serializationVersion")
200200
implementation(npm("@js-joda/core", "3.2.0"))
201201
}
202202
}
203203

204-
val jsTest by getting {
204+
val commonJsTest by creating {
205+
dependsOn(commonTest.get())
205206
dependencies {
206207
implementation(npm("@js-joda/timezone", "2.3.0"))
207208
}
208209
}
209210

211+
val jsMain by getting {
212+
dependsOn(commonJsMain)
213+
}
214+
215+
val jsTest by getting {
216+
dependsOn(commonJsTest)
217+
}
218+
210219
val nativeMain by getting {
211220
dependsOn(commonMain.get())
212221
dependencies {
@@ -383,3 +392,10 @@ tasks.withType<AbstractDokkaLeafTask>().configureEach {
383392
}
384393
}
385394
}
395+
396+
// Disable intermediate sourceSet compilation because we do not need js-wasmJs artifact
397+
tasks.configureEach {
398+
if (name == "compileCommonJsMainKotlinMetadata") {
399+
enabled = false
400+
}
401+
}
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.

0 commit comments

Comments
 (0)