Android Gradle versioncode in slack

Hi,

I would like to show the versionname and versioncode in a slack notification, but can’t find a possibility to do this. I tried to make an app env variable, but this didn’t help. Is there another way to create an environment variable with the values from build.gradle?

1 Like

From the Manifest file you can read infos with e.g. the Android Manifest Info step (there are quite a few others too if you search for Manifest in the step list).

To read from build.gradle… I’m not sure if there’s any step for that. But you can expose anything as an env var for subsequent steps using envman - related docs: http://devcenter.bitrise.io/tips-and-tricks/expose-environment-variable/

Example:

envman add --key MY_RELEASE_NOTE --value "This is the release note"

I hope this helps, if you’d have any questions, feel free to ask!