Build: Change node directory in :js:js.tests project to build/node

#KTI-1087
This commit is contained in:
Vyacheslav Gerasimov
2023-01-09 17:18:19 +01:00
committed by Space Team
parent b1e3226ed5
commit 417fef0d58
+7 -5
View File
@@ -16,10 +16,12 @@ plugins {
id("de.undercouch.download") id("de.undercouch.download")
} }
val nodeDir = buildDir.resolve("node")
node { node {
download.set(true) download.set(true)
version.set(nodejsVersion) version.set(nodejsVersion)
nodeProjectDir.set(buildDir) nodeProjectDir.set(nodeDir)
} }
val antLauncherJar by configurations.creating val antLauncherJar by configurations.creating
@@ -354,7 +356,7 @@ fun Test.setUpBoxTests() {
systemProperty("kotlin.ant.launcher.class", "org.apache.tools.ant.Main") systemProperty("kotlin.ant.launcher.class", "org.apache.tools.ant.Main")
} }
systemProperty("kotlin.js.test.root.out.dir", "$buildDir/") systemProperty("kotlin.js.test.root.out.dir", "$nodeDir/")
systemProperty( systemProperty(
"overwrite.output", project.providers.gradleProperty("overwrite.output") "overwrite.output", project.providers.gradleProperty("overwrite.output")
.forUseAtConfigurationTime().orNull ?: "false" .forUseAtConfigurationTime().orNull ?: "false"
@@ -447,16 +449,16 @@ val prepareNpmTestData by tasks.registering(Copy::class) {
include("package.json") include("package.json")
include("test.js") include("test.js")
} }
into(buildDir) into(nodeDir)
} }
val npmInstall by tasks.getting(NpmTask::class) { val npmInstall by tasks.getting(NpmTask::class) {
workingDir.set(buildDir) workingDir.set(nodeDir)
dependsOn(prepareNpmTestData) dependsOn(prepareNpmTestData)
} }
val mochaTest by task<MochaTestTask> { val mochaTest by task<MochaTestTask> {
workingDir.set(buildDir) workingDir.set(nodeDir)
val target = if (project.hasProperty("teamcity")) "runOnTeamcity" else "test" val target = if (project.hasProperty("teamcity")) "runOnTeamcity" else "test"
args.set(listOf("run", target)) args.set(listOf("run", target))