From 95f0b2abff0b4fac110da4129dcc8a8ae51e0d32 Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Wed, 24 Jun 2020 14:33:20 +0200 Subject: Fix npm caching --- plugins/base/frontend/build.gradle.kts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'plugins/base/frontend/build.gradle.kts') diff --git a/plugins/base/frontend/build.gradle.kts b/plugins/base/frontend/build.gradle.kts index 645ef826..a184c296 100644 --- a/plugins/base/frontend/build.gradle.kts +++ b/plugins/base/frontend/build.gradle.kts @@ -1,20 +1,20 @@ plugins { - id("com.moowork.node") version "1.3.1" + id("com.github.node-gradle.node") version "2.2.4" +} + +val npmRunBuild = tasks.getByName("npm_run_build") { + inputs.dir(file("src/main")) + inputs.files(file("package.json"), file("webpack.config.js")) + outputs.dir(file("dist/")) + outputs.cacheIf { true } } task("generateFrontendFiles") { - dependsOn("npmInstall", "npm_run_build") + dependsOn(npmRunBuild) } tasks { - val npmRunBuild by registering { - inputs.dir("$projectDir/src/main/") - inputs.files("$projectDir/package.json", "$projectDir/webpack.config.js") - outputs.dir("$projectDir/dist/") - outputs.cacheIf { true } - } - clean { - delete = setOf("$projectDir/node_modules", "$projectDir/dist/") + delete(file("node_modules"), file("dist")) } -} \ No newline at end of file +} -- cgit