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

Android App Bundle: --versionCode ignored with --packageType=bundle #873

Closed
anatoly-spb opened this issue Nov 25, 2019 · 6 comments · Fixed by #941
Closed

Android App Bundle: --versionCode ignored with --packageType=bundle #873

anatoly-spb opened this issue Nov 25, 2019 · 6 comments · Fixed by #941
Assignees
Labels

Comments

@anatoly-spb
Copy link

Bug Report

Problem

The following command ignore versionCode parameter when use --packageType=bundle

cordova build android -- --packageType=bundle --versionCode=500000

What is expected to happen?

cordova build android -- --packageType=bundle --versionCode=500000

versionCode must not ignored when --packageType=bundle is used

What does actually happen?

Now cordova uses version from config.xml and generates version instead of using the specified in --versionCode parameters

Information

cordova --version 9.0.0 (cordova-lib@9.0.1)

Command or Code

Environment, Platform, Device

Version information

Checklist

  • [ x] I searched for existing GitHub issues
  • [ x] I updated all Cordova tooling to most recent version
  • [ x] I included all the necessary information above
@breautek
Copy link
Contributor

Thanks for the report, I'll try to take a look at this tonight.

@breautek breautek self-assigned this Nov 25, 2019
@breautek breautek added the bug label Nov 26, 2019
@breautek
Copy link
Contributor

I have reproduced this issue and confirmed this as a bug.

@breautek
Copy link
Contributor

I do not know why --versionCode or --gradleArgs=-PcdvVersionCode is being ignored during bundle generation, but using the <widget android-versionCode="123"> attribute in config.xml could be a workaround as that does appear to work.

It's getting late for me so I have to pick this back up another time.

@tklaas
Copy link

tklaas commented Jan 6, 2020

@breautek
I came across this problem today, did you already do something or is the workaround through config.xml still the way to go? This is unfortunately not the best option since we are adding the version code within our CI build via command line :(

@breautek
Copy link
Contributor

breautek commented Jan 6, 2020

@breautek
I came across this problem today, did you already do something or is the workaround through config.xml still the way to go? This is unfortunately not the best option since we are adding the version code within our CI build via command line :(

No sorry, I haven't had a chance to relook at this. Afaik, the above workaround is the only way to properly set the versionCode 😭

@breautek
Copy link
Contributor

breautek commented Apr 1, 2020

And the issue all along was... I omitted passing down the flags if the package type was bundle in the original bundle implementation 🤦‍♂️

Amazing what kind of work can do when you ignore the issue for 3 months.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants