Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with versionName and string interpolation #7

Open
cbedoy opened this issue Oct 23, 2020 · 2 comments
Open

Problems with versionName and string interpolation #7

cbedoy opened this issue Oct 23, 2020 · 2 comments

Comments

@cbedoy
Copy link

cbedoy commented Oct 23, 2020

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
@sayem405
Copy link

I am also facing similar issue. Is there any solution for this ?

@joe-yeomans
Copy link

You can get around it by wrapping it in single quotes:

	  android_set_version_name(
		  version_name: "\'1.0.0\'"
	  )

micbakos-rdx added a commit to radixdlt/babylon-wallet-android that referenced this issue May 23, 2023
…uces

This plugin is unable to read the version name when it is a variable. It reads it as a string.
See this:
beplus/fastlane-plugin-versioning_android#7
micbakos-rdx added a commit to radixdlt/babylon-wallet-android that referenced this issue May 23, 2023
…uces

This plugin is unable to read the version name when it is a variable. It reads it as a string.
See this:
beplus/fastlane-plugin-versioning_android#7
micbakos-rdx added a commit to radixdlt/babylon-wallet-android that referenced this issue May 23, 2023
…uces

This plugin is unable to read the version name when it is a variable. It reads it as a string.
See this:
beplus/fastlane-plugin-versioning_android#7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants