[Gradle, JS] Not run task if root package.json doesn't exist

#KT-34832 fixed
This commit is contained in:
Ilya Goncharov
2020-04-16 14:18:47 +03:00
parent 86573c6dd1
commit 910f60b731
@@ -13,6 +13,10 @@ import java.io.File
open class KotlinNpmInstallTask : DefaultTask() {
init {
check(project == project.rootProject)
onlyIf {
rootPackageJson.exists()
}
}
private val nodeJs get() = NodeJsRootPlugin.apply(project.rootProject)