Missing UP-TO-DATE check on npmCiOrInstall task
The npmCiOrInstall
task is running npm on each build (npm ci
if package-lock.json is present, npm install
otherwise). This situation is occurring because there are no inputs defined for the task. The task should only run if package.json or package-lock.json has changed.
Instead of extending NpmTask
, extend NpmInstallTask
instead. The NpmInstallTask
sets up inputs for package.json and package-lock.json so that Gradle only runs the registered task if these files have changed.