Skip to content

Problems with versionName and string interpolation #7

@cbedoy

Description

@cbedoy

Hello,

I'm facing a problem when invoke android_get_version_name

Due my build.gradle has following structure:

android {

    def versionMajor = 6
    def versionMinor = 8
    def versionPatch = 27

    compileSdkVersion 30
    ....
    versionName "${versionMajor}.${versionMinor}.${versionPatch}"

Then android_get_version_name is returned ${versionMajor}.${versionMinor}.${versionPatch} instead of 6.8.27, I'm not sure if there's a problem with this plugin or do I have to change something from my side.

There's the fastlane step i have


platform :android do

  desc "Runs something fun"
  lane :doSomethingFun do
    gradle(task: "test")
    increment_version_code(
     gradle_file_path: “app/build.gradle”
    )
    versionName = android_get_version_name // <!-- here I'm getting `${versionMajor}.${versionMinor}.${versionPatch}`
    #gradle(task: "test")
  end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions