Skip to content

AAB(Android App Bundle) Support #671

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

Merged
merged 9 commits into from
Mar 13, 2022
Merged

AAB(Android App Bundle) Support #671

merged 9 commits into from
Mar 13, 2022

Conversation

rupeshkumar22
Copy link
Contributor

@rupeshkumar22 rupeshkumar22 commented Sep 24, 2021

Fixes #594

As AAB is the only way to distribute apps on Google Play Console. This PR adds a feature to generate signed AAB and Unsigned AAB. For Testing purposes, a universal APK was created with the help of bundletool.jar(included in SDK) from generated AAB file and installed on the emulator. No issue has been faced by doing so.

Generates AAB files as-
Documents/Processing/sketch_210923a/buildBundle/sketch_210923a_release_signed.aab
Documents/Processing/sketch_210923a/buildBundle/sketch_210923a_release_unsigned.aab

Regenerates Bundles similar to export-package utility as -
Documents/Processing/sketch_210923a/buildBundle.210924.0527/sketch_210923a_release_signed.aab
Documents/Processing/sketch_210923a/buildBundle.210924.0527/sketch_210923a_release_unsigned.aab

Method of initiating the task
File -> Export Signed Bundle

Keyboard Short Cut
Ctrl + B

Capture

@@ -48,7 +48,7 @@
static final String MANIFEST_ERROR_MESSAGE =
"Errors occurred while reading or writing " + MANIFEST_XML + ",\n" +
"which means lots of things are likely to stop working properly.\n" +
"To prevent losing any data, it's recommended that you use Save As\n" +
"To prevent losing any data, it's recommended that you use Save As\n" +
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Save As was highlighted please revert the change here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I don't know why but an unknown error was faced on this line due to these two characters used to highlight. After removing these characters Gradle's build was successful. That can be somewhat related to IDE saving the file in unknown encoding. I will confirm if the same error encounters again.

I am reverting the changes for now as you suggested. Thanks for pointing it out!

@ranaaditya
Copy link
Member

Thanks for this amazing contribution @rupesh-kumar-lpu 🥳

Do you have any kind of high level design doc for this feature or a rough idea how you have done this with the existing processing-android codebase ?

Thanks.

@rupeshkumar22
Copy link
Contributor Author

For implementing this I tried to reuse the existing functions. The implementation is pretty much similar to the "Export Signed Package". The origin of implementation starts from the 'JMenuItem' click handler in the AndroidEditor.java file. All the functions used for "Export Signed Package" were reused with slight modification(providing certain function parameters) to distinguish the use of AAB or APK tasks. For example, KeystoreManager's constructor was modified to pass the boolean type (forBundle) to distinguish about the exporting task.

Thanks for reviewing the changes @ranaaditya

@codeanticode
Copy link
Contributor

@rupesh-kumar-lpu thanks for the PR, will review and merge as soon as I can!

@codeanticode codeanticode merged commit a35e6de into processing:master Mar 13, 2022
@codeanticode
Copy link
Contributor

@rupesh-kumar-lpu Finally merged, thank you!

@rupeshkumar22
Copy link
Contributor Author

Thank you for taking out time to read too many lines of code 😊 @codeanticode @ranaaditya

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.

Google Play does not accept .apk anymore.
3 participants