Skip to content

Commit cc08426

Browse files
committed
Do not put kotlin dependency in package.json used for tests
kotlin.js is being extracted from kotlin-stdlib-js by populateNodeModules task, therefore getting it from npm is not necessary and fails when SNAPSHOT dependency was used.
1 parent 81f79c3 commit cc08426

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

gradle/node-js.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ node {
1313
task prepareNodePackage(type: Copy) {
1414
from("npm") {
1515
include 'package.json'
16-
expand project.properties
16+
expand (project.properties + [kotlinDependency: ""])
1717
}
1818
from("npm") {
1919
exclude 'package.json'

gradle/publish-npm-js.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def dryRun = prop("dryRun", "false")
2020

2121
task preparePublishNpm(type: Copy, dependsOn: [compileKotlin2Js]) {
2222
from(npmTemplateDir) {
23-
expand project.properties
23+
expand (project.properties + [kotlinDependency: "\"kotlin\": \"$kotlin_version\""])
2424
}
2525
from("$buildDir/classes/kotlin/main")
2626
into npmDeployDir

js/kotlinx-coroutines-core-js/npm/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@
2121
"JetBrains"
2222
],
2323
"dependencies": {
24-
"kotlin": "$kotlin_version"
24+
$kotlinDependency
2525
}
2626
}

0 commit comments

Comments
 (0)