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

fix: GH-873 App bundle builds to obey --versionCode arguments #941

Merged
merged 1 commit into from
Apr 1, 2020

Conversation

breautek
Copy link
Contributor

@breautek breautek commented Apr 1, 2020

Platforms affected

Android

Motivation and Context

There was an issue when building app bundles where it did not obey flags. This was an error in the original implementation where arguments was only propagated to gradle if the package type was "apk". This PR corrects this mistake.

Closes #873

Description

Moved a line that pushes gradle arguments outside of the package type condition, as it is applicable
to both package types.

Unit tests was added for both package types to ensure they both have args filled out as expected.

Testing

NPM test runs successfully, including 2 new tests that was added.
I've also ran aapt and bundletool to inspect the built files to ensure that the versionCode was as expected.

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

@breautek breautek requested a review from erisu April 1, 2020 04:40
@codecov-io
Copy link

codecov-io commented Apr 1, 2020

Codecov Report

Merging #941 into master will increase coverage by 0.10%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #941      +/-   ##
==========================================
+ Coverage   65.42%   65.53%   +0.10%     
==========================================
  Files          21       21              
  Lines        1828     1828              
==========================================
+ Hits         1196     1198       +2     
+ Misses        632      630       -2     
Impacted Files Coverage Δ
...n/templates/cordova/lib/builders/ProjectBuilder.js 73.21% <100.00%> (ø)
bin/templates/cordova/lib/check_reqs.js 52.17% <0.00%> (+0.96%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c81cd87...ab20456. Read the comment docs.

@breautek breautek merged commit c93f93f into apache:master Apr 1, 2020
@breautek breautek deleted the GH-873-app-bundle-version-code branch April 1, 2020 04:59
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

Successfully merging this pull request may close these issues.

Android App Bundle: --versionCode ignored with --packageType=bundle
3 participants