NpmInstallTask/YarnInstallTask declare inputs/outputs twice.
We found this while backporting functionality from here. https://github.com/node-gradle/gradle-node-plugin/issues/20
inputs/outputs are declared twice and only one is optional.
Line 25 should have had a .optional() at the end to match.
https://github.com/srs/gradle-node-plugin/blob/3052d9bd2db5c8fbe4bc3fd0306fcb8a805c0577/src/main/groovy/com/moowork/gradle/node/npm/NpmInstallTask.groovy#L23-L27
https://github.com/srs/gradle-node-plugin/blob/3052d9bd2db5c8fbe4bc3fd0306fcb8a805c0577/src/main/groovy/com/moowork/gradle/node/npm/NpmInstallTask.groovy#L39-L42
Also, in the case of npm install the package-lock.json should probably be an output https://docs.npmjs.com/files/package-lock.json