android - Read versionName of build.gradle from Jenkins -
i'm using jenkins android app builds. on every build, info, build number, etc...
i'm searching way read versionname
value of in build.gradle
when jenkins build job. know can buildnumber $build_number
env variable, how versionname
?
you adding execute shell step determines versionname
, , exporting environment variable using envinject plugin.
assuming build.gradle
contains:
versionname = myname
you can add script:
v=$(cat build.gradle | grep versionname | awk '{print $3}') echo my_version_name=${v} > env.properties
Comments
Post a Comment