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

Add scripts to use Android App Bundles #1028

Merged
merged 1 commit into from
May 17, 2019

Conversation

jtreanor
Copy link
Contributor

@jtreanor jtreanor commented Apr 29, 2019

This adds two scripts script, tools/build-app-bundle.sh and tools/install-app-bundle.sh which makes it easier to build and test Android App Bundle (.aab) files.

The scripts are simplified versions of the ones in WPAndroid. We should think about sharing these at some point.

Related to wordpress-mobile/WordPress-Android#9734.

To test:

  • Build an Android App Bundle: ./tools/build-app-bundle.sh. This will prompt you to install bundletool if you don't have it installed.
  • Install it in a device or emulator: ./tools/install-app-bundle.sh artifacts/wcandroid-1.8-rc-1.aab.
  • Check that it works correctly (particularly Google login).
  • Install the APK: adb install artifacts/wcandroid-1.8-rc-1-universal.apk.
  • Check that it works correctly (particularly Google login).

Update release notes:

  • If there are user facing changes, I have added an item to RELEASE-NOTES.txt.

@jtreanor jtreanor added the category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc. label Apr 29, 2019
@jtreanor jtreanor added this to the 1.8 milestone Apr 29, 2019
@jtreanor jtreanor force-pushed the feature/android-app-bundle branch from 5855f9a to f21aff7 Compare May 3, 2019 14:56
@jtreanor jtreanor requested a review from loremattei May 3, 2019 14:56
@jtreanor jtreanor marked this pull request as ready for review May 3, 2019 14:56
Copy link
Contributor

@loremattei loremattei left a comment

Choose a reason for hiding this comment

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

I tested the app and it seems that Google login doesn't work building the app this way.
I'm not sure it this is an issue only for local debug installations or if it may affect the distribution from Google Play store as well (it may not, since play store resigns the aab), but I think it needs some more investigation.

@loremattei loremattei modified the milestones: 1.8, 1.9 May 6, 2019
@jtreanor
Copy link
Contributor Author

jtreanor commented May 7, 2019

That's strange @loremattei 🤔 I had tested Google login and . it worked fine. Certainly worth investigating this.

@loremattei
Copy link
Contributor

@jtreanor I investigated this a little bit more and I think the problem is with the signature. If you sign the generated apk with the proper key, Google login works. If you don't pass any key to bundletool it uses a debug key and google login doesn't work (at least on my test device).

@jtreanor
Copy link
Contributor Author

jtreanor commented May 9, 2019

Ah, thanks @loremattei. I suspected that might be the case. I'll update the script with signing.

@jtreanor jtreanor force-pushed the feature/android-app-bundle branch from f21aff7 to 522ec04 Compare May 17, 2019 11:41
@jtreanor jtreanor changed the title Add tools/install-app-bundle.sh Add scripts to use Android App Bundles May 17, 2019
@jtreanor jtreanor force-pushed the feature/android-app-bundle branch from 522ec04 to 7b2eb0d Compare May 17, 2019 11:49
@jtreanor
Copy link
Contributor Author

@loremattei This is ready for another pass now. Here is what I have changed:

  • Added ./tools/build-app-bundle.sh which builds the app bundle and extracts the universal APK.
  • Updated ./tools/install-app-bundle.sh to correctly sign to app. Confirmed Google login works now.

The scripts are adapted from WPAndroid.

@loremattei
Copy link
Contributor

Cool! I tested the changes @jtreanor and it looks like we can ship it 👍

@loremattei loremattei merged commit df23a83 into develop May 17, 2019
@loremattei loremattei deleted the feature/android-app-bundle branch May 17, 2019 12:39
wzieba added a commit that referenced this pull request Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: tooling Anything that involves building & maintaining the project, including scripts, `Fastfile`, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants