Title says it all, I'm currently using a file in my '.gradle' directory called 'gradle.properties' to set systempProp.http.proxy*
stuff. I've noticed that with Grails you don't need to set a http.proxy.proxyPassword
just the http.proxHost
, http.proxyPort
, and http.proxyUser
in the '.grails\ProxySettings.groovy' file.
Is there some systemProp/configuration I can use so I don't need to put my password in plaintext using Gradle?
Gradle cannot eliminate the need for a password, if your proxy requires it. If you however do not want to check your password into code (clearly, that is a stupid thing to do :) ), you should use environment variables to hide it.
You can either set the env variable: http.proxyPassword
to your password, or run gradle with a -D
parameter:
gradle -Dhttp.proxyHost=*** -Dhttp.proxyPort=*** -Dhttp.proxyUser=**** -Dhttp.proxyPassword=****
Keep in mind that if someone else is building your code without proper env variables set, their build might fail, so remember to include proper instructions.
Also note that there is a different set of properties for https. Oh and if your proxy interferes with SSL certificates, you might also have to import your proxy certificates into your truststore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With