[Gradle, JS] Fix run for nodejs with IR backend
This commit is contained in:
+5
-3
@@ -5,7 +5,6 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle.targets.js.ir
|
||||
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJsCompilation
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsIrNodeDsl
|
||||
import org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsExec
|
||||
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
|
||||
@@ -39,9 +38,12 @@ open class KotlinNodeJsIr @Inject constructor(target: KotlinJsIrTarget) :
|
||||
}
|
||||
|
||||
private fun configureRun(
|
||||
compilation: KotlinJsCompilation
|
||||
compilation: KotlinJsIrCompilation
|
||||
) {
|
||||
val runTaskHolder = NodeJsExec.create(compilation, disambiguateCamelCased(RUN_TASK_NAME))
|
||||
val runTaskHolder = NodeJsExec.create(compilation, disambiguateCamelCased(RUN_TASK_NAME)) {
|
||||
dependsOn(compilation.developmentLinkTaskName)
|
||||
args(compilation.developmentLinkTask.outputFile)
|
||||
}
|
||||
target.runTask.dependsOn(runTaskHolder)
|
||||
}
|
||||
|
||||
|
||||
-1
@@ -77,7 +77,6 @@ open class NodeJsExec : AbstractExecTask<NodeJsExec>(NodeJsExec::class.java), Re
|
||||
|
||||
val compileKotlinTask = compilation.compileKotlinTask
|
||||
it.dependsOn(nodeJs.npmInstallTask, compileKotlinTask)
|
||||
it.args(compileKotlinTask.outputFile)
|
||||
|
||||
it.configuration()
|
||||
}
|
||||
|
||||
+3
-1
@@ -35,7 +35,9 @@ open class KotlinNodeJs @Inject constructor(target: KotlinJsTarget) :
|
||||
private fun configureRun(
|
||||
compilation: KotlinJsCompilation
|
||||
) {
|
||||
val runTaskHolder = NodeJsExec.create(compilation, disambiguateCamelCased(RUN_TASK_NAME))
|
||||
val runTaskHolder = NodeJsExec.create(compilation, disambiguateCamelCased(RUN_TASK_NAME)) {
|
||||
args(compilation.compileKotlinTask.outputFile)
|
||||
}
|
||||
target.runTask.dependsOn(runTaskHolder)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user