From 113aaab865a9a7038a551536a2f258b06d79fdf1 Mon Sep 17 00:00:00 2001 From: "Blue (Lukas Rieger)" Date: Wed, 15 Jan 2020 20:57:51 +0100 Subject: [PATCH] Fix build by creating an empty package-lock if none exists --- BlueMapCore/build.gradle | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/BlueMapCore/build.gradle b/BlueMapCore/build.gradle index 39422d73..cbd52a0b 100644 --- a/BlueMapCore/build.gradle +++ b/BlueMapCore/build.gradle @@ -21,6 +21,12 @@ node { download = true } +task fixPackageLock() { + if (!file("./package-lock.json").exists()) { + file("./package-lock.json").text = "" + } +} + task cleanWebroot(type: Delete) { delete 'build/generated/webroot/' } @@ -39,6 +45,7 @@ task zipWebroot(type: Zip) { // removes tmp build directory, build project with webpack, zip contents for the shaded jar task buildWebroot { + dependsOn 'fixPackageLock' dependsOn 'npmInstall' dependsOn 'cleanWebroot' dependsOn 'webpackWebroot'