srs / gradle-node-plugin

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

Change the distBaseUrl by build.gradle node settings #281

Closed flosch0815 closed 6 years ago

flosch0815 commented 6 years ago

I've tried to use the gradle-node-plugin as part of our build.gradle file and I failed. Since we have a proxy I began to look for a solution and found ISSUE #273 "Hassle with proxy settings". It would be great to configure the proxy, but for our implementation, it would be perfect to have the distBaseUrl configurable in build.gradle. In our application, we use a nexus repository to have all the dependencies (eg. npm, gradle etc.) managed for us. We would like to link the nodejs/dist as a repository in the nexus. So the application can look for node bins there. Is it possible to have the distBaseUrl configurable in your plugin?

flosch0815 commented 6 years ago

I thought it wasnt possible, but actually it is possible to set the variable like that. Sorry for bothering you.

Best regards

f3rdy commented 6 years ago

@flosch0815 Could you please tell us, how you set this variable a little bit more detailed?

f3rdy commented 6 years ago

figured it out myself:

node {
    distBaseUrl = 'http://myproxy'
}
flosch0815 commented 6 years ago

I'm sorry! I was reading this to late. ;-) That exactly the right way.