Git tag plugin custom app version name

#1

I want to use the git tag in my workflow, it works with the version number, however i would like to use my Android version name $ANDROID_VERSION_NAME I have the following gradle setup

def appVersionCode = System.getenv(Config.BITRISE_BUILD_NUMBER_VARIABLE)
        def appVersionName = String.format("%s.%s.%s", VERSION_CODE, 
VERSION_CODE_MINOR, appVersionCode) // VERSION_CODE= 1, VERSION_CODE_MINOR=0

    applicationId "com.test.aaa"
    minSdkVersion Config.ANDROID_MIN_VERSION
    targetSdkVersion Config.ANDROID_TARGET_VERSION
    versionCode appVersionCode 
    versionName appVersionName

If I use $ANDROID_VERSION_NAME from bitrise, the string “output” is appVersionName instead something like 1.0.37, how I can read this? I would like to have the control in the gradle instead bitrise for versioning.
Any help? Thanks a lot!

0 Likes