Skip to content

Commit

Permalink
Move js files into commonJs source set
Browse files Browse the repository at this point in the history
  • Loading branch information
igoriakovlev authored and ilya-g committed Dec 1, 2023
1 parent 53ffd13 commit 87cc920
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 3 deletions.
22 changes: 19 additions & 3 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -193,20 +193,29 @@ kotlin {
}
}

val jsMain by getting {
val commonJsMain by creating {
dependsOn(commonMain.get())
dependencies {
api("org.jetbrains.kotlin:kotlin-stdlib-js")
api("org.jetbrains.kotlinx:kotlinx-serialization-core:$serializationVersion")
implementation(npm("@js-joda/core", "3.2.0"))
}
}

val jsTest by getting {
val commonJsTest by creating {
dependsOn(commonTest.get())
dependencies {
implementation(npm("@js-joda/timezone", "2.3.0"))
}
}

val jsMain by getting {
dependsOn(commonJsMain)
}

val jsTest by getting {
dependsOn(commonJsTest)
}

val nativeMain by getting {
dependsOn(commonMain.get())
dependencies {
Expand Down Expand Up @@ -383,3 +392,10 @@ tasks.withType<AbstractDokkaLeafTask>().configureEach {
}
}
}

// Disable intermediate sourceSet compilation because we do not need js-wasmJs artifact
tasks.configureEach {
if (name == "compileCommonJsMainKotlinMetadata") {
enabled = false
}
}
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 comments on commit 87cc920

Please sign in to comment.