[Gradle, JS] Use node_modules dir existence as marker of up-to-date
^KT-34014 fixed ^KT-49505 fixed
This commit is contained in:
+13
@@ -31,6 +31,19 @@ open class KotlinNpmInstallTask : DefaultTask() {
|
||||
@Input
|
||||
val args: MutableList<String> = mutableListOf()
|
||||
|
||||
@get:Internal
|
||||
val nodeModulesDir: File by lazy {
|
||||
(nodeJs ?: unavailableValueError("nodeJs"))
|
||||
.rootPackageDir
|
||||
.resolve("node_modules")
|
||||
}
|
||||
|
||||
init {
|
||||
outputs.upToDateWhen {
|
||||
nodeModulesDir.isDirectory
|
||||
}
|
||||
}
|
||||
|
||||
@Suppress("unused")
|
||||
@get:PathSensitive(PathSensitivity.ABSOLUTE)
|
||||
@get:IgnoreEmptyDirectories
|
||||
|
||||
Reference in New Issue
Block a user