shredder
shredder

Reputation: 1457

How can I access the 'versionName' property (which is in my Android gradle file) from Jenkins?

I have a Jenkins job building an Android app using Gradle. Jenkins sends the $BUILD_VERSION down to the gradle file, no problems, so that the app is able to give itself a version such as 3.2.4.(32) where 32 is the sequential build number of the Jenkins job.

I would like to log the complete version string as part of the Jenkins routine, but Jenkins only knows about the 32.

I've searched for ways to set environment variables etc but I feel like there must be a very easy way to do this that I'm missing.

Upvotes: 0

Views: 470

Answers (1)

Slav
Slav

Reputation: 27485

EnvInject plugin is the "very easy way" of doing this :)

Upvotes: 1

Related Questions