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

[Gutenberg] Use JS bundle from JitPack #9156

Merged
merged 5 commits into from
Jan 31, 2019
Merged

Conversation

hypest
Copy link
Contributor

@hypest hypest commented Jan 30, 2019

This PR removes the dependency on Travis+AWS to get the Gutenberg JS bundle and instead, expects the file to be available via the bridge aar as an assets resource and resources merging.

To test:

  1. Build and run the wpandroid app having the wp.BUILD_GUTENBERG_FROM_SOURCE gradle flag to true so the build will depend on the prebuilt JitPack library artifacts. The app should compile and run fine.
  2. Run the app, enable GB in the App Settings and open a GB post. It should work as normal.
  3. Check out the <rootfolder>/WordPress/src/main/assets folder and make sure there is no index.android.bundle file present. That used to be the JS bundle loaded by GB but now that lives inside the bridge library aar.

Update release notes:

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

Copy link
Contributor

@daniloercoli daniloercoli left a comment

Choose a reason for hiding this comment

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

Tested and works fine! Both with wp.BUILD_GUTENBERG_FROM_SOURCE gradle flag set to true, and false.

@hypest
Copy link
Contributor Author

hypest commented Jan 31, 2019

Thanks for the review @daniloercoli !

I added a commit (1437901) to have gradle fail the build if the legacy JS bundle is still present, so we are sure the proper bundle is used. Would you mind doing another pass to include this in the review? Thanks!

To test:

  1. touch WordPress/src/main/index.android.bundle to create the legacy file if not already present in your file tree
  2. ./gradlew assembleWasabiDebug to build the project. It should fail with an error, otherwise it shouldn't fail if you delete the file.

@daniloercoli
Copy link
Contributor

Works as expected @hypest - LGTM!!
Error: Legacy Gutenberg JS bundle file detected. Please delete it: <root>/WordPress-Android/WordPress/src/main/assets/index.android.bundle. Expression: this.file(legacyGBBundleFile).exists() Open File

@hypest
Copy link
Contributor Author

hypest commented Jan 31, 2019

Awesome, thanks @daniloercoli !

I'll wait for the LGTM and merge of wordpress-mobile/gutenberg-mobile#526 and then update and merge this one too.

@hypest hypest merged commit 14eb6cb into develop Jan 31, 2019
@hypest hypest deleted the gb/use-js-bundle-from-jitpack branch January 31, 2019 18:32
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.

2 participants