If I put gradle-wrapper.properties into my project then anybody who has access to my source code would would have access to my credentials. Alternatively, if I put the gradle-wrapper.properties file into my build image then all of my builds will be tied to the same credentials. Neither of these are acceptable.
What I’d much rather do is have Gradle Wrapper pick up it’s credentials from environment variables. My run-time environment makes it very easy to provide the credentials in this way - but is there a way to make Gradle consume the credentials from an environment variable?
It is my first post here so I hope it will be helpful.
A while ago have a similar task - build artifact and the put it in the Artifactory. And this was through CI Jenkins job.
Below is the build.gradle part related to the Artifactory credentials: