Repository navigation
Update react-native-bridge to build an AAR to publish on Bintray and use in WordPress Android - #28216
Conversation
This will allow adding Aztec to the Gutenberg AAR to allow clients to fallback to it.
Notice the addition of a white color resource. This was required by the fat AAR generation. Without it, the task would fail as follows: ``` > Task :reBundleAarRelease [fat-aar]target: /path/to/repo/packages/react-native-bridge/android/build/outputs/aar/@wordpress_react-native-bridge-release.aar > Task :verifyReleaseResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':verifyReleaseResources'. > 1 exception was raised by workers: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed /path/to/repo/packages/react-native-bridge/android/build/intermediates/res/merged/release/drawable/ic_check_24px.xml:6: error: resource color/white (aka org.wordpress.mobile.ReactNativeGutenbergBridge:color/white) not found. ... ```
| // FIXME: Once this works properly poit to 'wordpress-mobile' | ||
| userOrg = 'mokagio' | ||
| // FIXME: Once this works properly poit to the original gutenberg (or gutenberg-mobile) repo. See also: https://github.com/oguzkocer/gutenberg/commit/0ca71b1abe3ea22b77abb3f390534e66e39161d5#diff-320e7dacc9e9a83ac8128d299319f82cf6dfa2609e0ebbc043d13de33ea92773R350-R353 | ||
| vcsUrl = 'https://github.com/wordpress-mobile/gutenberg-mobile.git' |
There was a problem hiding this comment.
I discussed this with @oguzkocer and @mchowning. I'll update to point to wordpress-mobile before merging this.
Time to go official
This is as a result of the this CI failure: https://github.com/WordPress/gutenberg/pull/28216/checks?check_run_id=1710376166
| assets.srcDirs += '../../../../src/block-support' | ||
| // Despite being in a folder called "resources", the files in | ||
| // unsupported-block-editor are accessed as assets by their | ||
| // consumers: the WordPressEditor library. | ||
| assets.srcDirs += '../../../../resources/unsupported-block-editor' |
There was a problem hiding this comment.
These are not required for the AAR generation, but we'll use them to address wordpress-mobile/WordPress-Android#13747.
There was a problem hiding this comment.
Right, this is something we'll take another look at before merging to master. 👍
|
I'm concerned by the Android E2E tests failing. @mchowning any tips on how to start looking into it? |
|
This is looking good. I tested it and it is generally working quite well! 👍 The only issue I'm seeing is that, unless I'm mistaken, the build is not generating the javascript bundle by default. So if you I realize that this setup is going to change a lot, particularly with @oguzkocer 's composite build changes, so I don't think we need to have this fully worked out at this point. With that said, I think we would be better off building the js bundle default, and requiring that we affirmatively do something (set a variable, etc.) to tell the build to skip building the js bundle. wdyt?
Our E2E tests can be flaky 😞 (although this seems to be failing somewhat consistently). The tests passed for me locally, so I think it may not be worth worrying about them at this point since we're only merging to a feature branch. I also don't think the performance test failures have anything to do with your changes. I think there's a decent chance that once we bring in the latest changes from I don't view any of these issues as blockers since we're targeting a feature branch, so I'll go ahead and approve. Just let me (or, if I'm not around, any other gutenberg dev) know if you want to get this merged (I'm assuming you won't be able to merge it yourself yet). |
|
Going ahead and merging this so @oguzkocer can work on top of this. |
Description
This is part of the Composite Android build for Gutenberg, an effort to simplify and speed up the build and workflow for developers of the WordPress Android app.
The changes in this PR are the minimum require to build an AAR that can both be published to Bintray and used by the WordPress app.
The diff includes changes to the
package-lock.jsonbecause CI told me so even though I didn't changed thepackage.jsonitself 🤔 .This supersedes #27836.
How has this been tested?
I generated and published an AAR from this changeset and verified it works in the WordPress app via this PR.
Types of changes
This PR tweaks the
react-native-bridge/androidbuild configuration only.Checklist:
My code is tested.There's no infrastructure to test these changes automatically. I only performed manual testing, i.e.: run the generated AAR in the WrodPress Android app and verified it works.My code follows the WordPress code style.N.A.My code follows the accessibility standards.N.A.I've updated all React Native files affected by any refactorings/renamings in this PR.N.A.