[Gradle, JS] Use node_modules dir existence as marker of up-to-date
^KT-34014 fixed ^KT-49505 fixed
This commit is contained in:
-1
@@ -20,7 +20,6 @@ kotlin {
|
||||
inputFileProperty.set(provider { compilation.npmProject.require("webpack/bin/webpack.js") }.map { RegularFile { File(it) } })
|
||||
dependsOn("browserDevelopmentWebpack")
|
||||
val configFile = tasks.named<org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpack>("browserDevelopmentWebpack").map { it.configFile }.get()
|
||||
configFile.parentFile.listFiles().forEach { println(it)}
|
||||
args("configtest")
|
||||
args(configFile.absolutePath)
|
||||
}
|
||||
|
||||
+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