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

feat!: release build defaults to aab package type #1268

Merged
merged 2 commits into from Jul 13, 2021

Conversation

erisu
Copy link
Member

@erisu erisu commented Jul 13, 2021

Motivation, Context & Description

This PR changes the default package type of the release builds to be aab (Android App Bundle). In August, AAB format is required for all new apps.

https://developer.android.com/distribute/play-policies#RequirementForNewApps

Exisiting apps can continue to release APK packages till November. To continue to build release APK, append the --packageType=apk flag to the build command.

Testing

  • npm t
  • Android build with command line

Checklist

  • I've run the tests to see all new and existing tests pass
  • I've updated the documentation if necessary

@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2021

Codecov Report

Merging #1268 (3f7b9c0) into master (70a1eff) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1268      +/-   ##
==========================================
- Coverage   71.15%   71.12%   -0.03%     
==========================================
  Files          21       21              
  Lines        1650     1652       +2     
==========================================
+ Hits         1174     1175       +1     
- Misses        476      477       +1     
Impacted Files Coverage Δ
bin/templates/cordova/lib/build.js 39.60% <66.66%> (+0.21%) ⬆️

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 70a1eff...3f7b9c0. Read the comment docs.

@erisu erisu merged commit f6d1dee into apache:master Jul 13, 2021
@erisu erisu deleted the feat/release-build-aab-default branch July 13, 2021 07:34
@NiklasMerz NiklasMerz added this to the 10.0.0 milestone Jul 13, 2021
@hknoerrer
Copy link

Hi @erisu,
you wrote: "To continue to build release APK, append the --buildType=apk flag to the build command."
Found out that "buildType" is responsible to build 'release' or 'debug'.
As i see 'packageType' is the right argument to set the package type.
And valid values are 'apk' and 'bundle' as defined in PackageType.js.

As a result, if i want an APK for production build
i have to add "packageType": "apk" in my build.json.
and use:
ionic cordova build android --configuration production --release --buildConfig=build.json

or
just call
ionic cordova build android --configuration production --release -- -- --packageType=apk

Am i right?

@erisu
Copy link
Member Author

erisu commented Nov 19, 2021

I do not know the Ionic CLI is structured, how it pipes values to Cordova CLI, or how it is used.

But with Cordova CLI, the command is:

cordova build android --release -- --packageType=apk

I don't know what --configuration production is.

The build config should work as long as the correct property is defined.

For this PR description which mentioned--buildType=apk, that was a mistake. I meant to say packageType.

@hknoerrer
Copy link

Thank you for the clarification.

wedgberto pushed a commit to wedgberto/cordova-android that referenced this pull request May 17, 2022
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.

None yet

5 participants