Why is Gradle build not sending authentication to Artifactory?

Why is Gradle build not sending authentication to Artifactory?

AuthorFullName__c
JFrog Support
articleNumber
000001071
ft:sourceType
Salesforce
FirstPublishedDate
2016-09-05T14:54:22Z
lastModifiedDate
2016-09-05
VersionNumber
5

If you are using the SetEnv plugin in Jenkins of Hudson, it resets the environment variables the gradle plugin is setting which causes the build properties to not be sent.

 

This can be worked around by adding this JVM option to the Gradle execution:

-DbuildInfoConfig.propertiesFile=${BUILDINFO_PROPFILE}