Repository navigation
Configure project to fetch Gutenberg as an AAR from Bintray by default - #13642
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
9c919b6 to
959b3c5
Compare
|
You can test the changes on this Pull Request by downloading the APK here. |
|
Asking @mchowning and @loremattei for review, despite the PR still being a draft to double-check everything works and makes sense. Thanks! 🙇 |
| // | ||
| // A starting point might be the fact that the | ||
| // @wordpress_react-native-bridge-release AAR contains only the | ||
| // -release.aar version of Hermes in its libs folder |
There was a problem hiding this comment.
In testing this earlier, I also noticed that the hermes dependency bundled in the aar was way too small of a file (only 22 bytes). 😕
|
I only had time to do a quick test, but using 959b3c5 from this PR and 39bb2901be from the gutenberg PR, both the from-source and from-binary builds worked for me! 🎉 This is some great work @mokagio ! |
oguzkocer
left a comment
There was a problem hiding this comment.
@mokagio This looks good to me for the Phase 1 merge. I left a minor comment that's not a blocker (I can make the change as part of the composite build work if you prefer) and it's just waiting the base branch to be updated. There also seems to be a second similar PR, so I wasn't sure which one you wanted to merge. If you can set things up for merge, I can do that tomorrow.
959b3c5 to
52c194a
Compare
|
@oguzkocer thank you for the reviews(s 😄) and for helping me out shaping this to be in a better form. I'll try to address your comments ASAP 👍 |
We only use it in the editor library, so the import that's there is enough.
That's where it should live because it's required only by WordPressEditor, even though at this point in time we need to import it via the WordPress because of the "Direct local .aar dependencies are not supported" error.
oguzkocer
left a comment
There was a problem hiding this comment.
For phase 1, this looks good to me. I think we should mark this PR as ready for review and merge it directly to gutenberg-composite-build branch. However, before that, one thing we should probably track is the commit we use to build the bintray version of gutenberg for each PR. Since the gutenbergMobileVersion does not contain that information, we should probably add the gutenberg and gb-mobile commits as a comment above the ext.gutenbergMobileVersion line, so we can reproduce a build if necessary.
What do you think @mokagio?
Absolutely! I hadn't considered that and simply rolled with the approach I originally used to generate the version based on a timestamp. That was useful at the start, but we should definitely use the commit instead. In fact, rather than compromise and leave a comment which could easily become outdated, I'll just go ahead and generate a new version that uses the SHA as its identifier. I'll use the commit SHA from In WordPress-Utils-Android, we use |
This will make it easier to reconstruct the state of the codebase if we want to run a local build using the code that produced that binary.
|
@oguzkocer, I thought f2cf853 solved the "Direct local If I run Something worth noting is that If the answer to that question is yes, then I guess the PR is really, finally ready to merge 😄 |
|
@mokagio That I also don't think I am not able to give this a try today, but I can try it out tomorrow if you can't do it. |
😮 yeah that makes sense. I tried it and it worked 👏 |
FWIW, I think |
We were on mine while ironing out the details of the setup. Now that it works fine, I don't fear "polluting" the official org as much.
Generated by 🚫 dangerJS |
|
@oguzkocer @mchowning gentlemen, I think this is now really ready to merge. I tried it myself but since there's a lot of stuff going on under the hood that I did to address some of the comments since @oguzkocer approval, can I bug you to have another look to see if this works for you, too? (If it does, feel free to merge) Thanks a lot 🙇 |
oguzkocer
left a comment
There was a problem hiding this comment.
This looks good to me as a first step, so I'd vote for merging it. The only issue seems to be ci/circleci: gutenberg-bundle-build CI task. If that's not a blocker (something we can address in another PR or just ignore), feel free to merge this to the WIP branch @mokagio.
Please note that I'll be making a lot of changes to these for composite builds, so it helps me to merge this as soon as possible.
|
Thanks @oguzkocer 👍 Interesting that the build failure is due to CI running out of memory:
That's something I'm seeing on the |
We've been seeing that error sometimes on WPAndroid PRs, so most likely it's a preexisting issue (i.e., we need to better tune the memory config on CI) and not a new one (most WPAndroid devs probably never see that error because CI is pulling a previously built bundle from the cache for them). |
|
Thanks for the extra context @mchowning. I've seen that often while working on wordpress-mobile/gutenberg-mobile#2945 and I think I got it to a stable place memory wise 🤞 |
☝️ Before merging this we need to be publishing Gutenberg to the WordPress org. For that, we need to finish the work in WordPress/gutenberg#27836.
This makes the project use the Gutenberg React Native Android bridge AAR version published to Bintray.
To test, make sure to set
wp.BUILD_GUTENBERG_FROM_SOURCE=falsein yourgradle.propertiesto make the build system use the Bintray package, then run the app and try to publish a post. Verify that the build and editor still work with the property set totrue.Current limitations
mobile-gutenbergandgutenbergas submodules in the repository. This will likely be addressed in a dedicated followup PR, given the scope of the task.PR submission checklist:
I have considered adding unit tests where possible.I have considered adding accessibility improvements for my changes.I have considered if this change warrants user-facing release notes and have added them toRELEASE-NOTES.txtif necessary.