srs / gradle-node-plugin

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

Include environment variables in yarnSetup #275

Open hem-brahmbhatt opened 6 years ago

hem-brahmbhatt commented 6 years ago

Problem

yarnSetup task fails with Error: Failed to replace env in config: ${NPM_TOKEN} when:

Potential solution

Allow environment variables to be included during the yarnSetup task.

i.e.

yarnSetup {
    environment = ['NPM_TOKEN': System.getenv('NPM_TOKEN')]
}