Version properties for Gradle Android running under Jenkins is always unspecified

Environment: Gradle Android, Aritifactory Plugin for Jenkins and Jenkins. Running a Jenkins job that build Android using Gradle Android and trying to upload to Artifactory via the plugin, the version property for the build.gradle is not honor. Instead it is set to ‘unspecified’.