srs / gradle-node-plugin

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

Groovy incorrectly cast workingDir object to wrong class #294

Open tranpeter opened 6 years ago

tranpeter commented 6 years ago

In my build.gradle, I define a task with the following definition:

task customNpmInstall(type: NpmTask) {
    workingDir="${projectDir}/00_publish"
    args = ["install", "--production"]
}

The Groovy incorrectly cast the Object type to String rather than a java.io.File as required in the NpmTask code.

https://github.com/srs/gradle-node-plugin/blob/9484b92fc7a374dfbd7c638912bbb7aea2a62796/src/main/groovy/com/moowork/gradle/node/npm/NpmTask.groovy#L35