srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
867 stars 210 forks source link

NpmInstallTask/YarnInstallTask declare inputs/outputs twice. #336

Open deepy opened 5 years ago

deepy commented 5 years ago

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

deepy commented 5 years ago

Also, in the case of npm install the package-lock.json should probably be an output https://docs.npmjs.com/files/package-lock.json