-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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] Enable build from monorepo #11956
[Gutenberg] Enable build from monorepo #11956
Conversation
Generated by 🚫 dangerJS |
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @cameronvoell ! Lots of great progress here!
Not sure if this has been implemented yet, but building with the wp.BUILD_GUTENBERG_FROM_SOURCE
flag set to true fails for me:
Could not determine the dependencies of task ':react-native-video:generateDebugRFile'.
> Could not resolve all task dependencies for configuration ':react-native-video:debugRuntimeClasspath'.
> Could not find com.facebook.react:react-native:0.61.5.
Searched in the following locations:
- file:/Users/matt/.m2/repository/com/facebook/react/react-native/0.61.5/react-native-0.61.5.pom
- file:/Users/matt/.m2/repository/com/facebook/react/react-native/0.61.5/react-native-0.61.5.jar
- file:/Users/matt/dev/a8c/WordPress-Android/libs/gutenberg-mobile/gutenberg/node_modules/react-native-video/node_modules/react-native/android/com/facebook/react/react-native/0.61.5/react-native-0.61.5.pom
- file:/Users/matt/dev/a8c/WordPress-Android/libs/gutenberg-mobile/gutenberg/node_modules/react-native-video/node_modules/react-native/android/com/facebook/react/react-native/0.61.5/react-native-0.61.5.jar
Required by:
project :react-native-video
Let me know if you think that might just be a local issue on my machine.
Also, if I am not building from source ( Resolvedwp.BUILD_GUTENBERG_FROM_SOURCE=false
), I'm getting the error mentioned in this comment when I load the editor.
@@ -9,25 +9,27 @@ include ':libs:login:WordPressLoginFlow' | |||
include ':WordPressMocks' | |||
project(':WordPressMocks').projectDir = new File(rootProject.projectDir, properties.getOrDefault('wp.wordpress_mocks_path', 'libs/mocks') + '/WordPressMocks') | |||
|
|||
include ':react-native-aztec' | |||
project(':react-native-aztec').projectDir = new File(rootProject.projectDir, 'libs/gutenberg-mobile/react-native-aztec/android') | |||
include ':@wordpress_react-native-aztec' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, what is the significance of using an "@" and adding the "wordpress" prefix both here and for @wordPress_react-native-bridge
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It just reflects the npm package name @wordpress/react-native-aztec
. When you autolink a react-native dependency, it will keep the @
and replace the /
with an _
.
You can test the changes on this Pull Request by downloading the APK here. |
Went in to try to help with the -url "$rootDir/libs/gutenberg-mobile/node_modules/react-native/android"
+url "$rootDir/libs/gutenberg-mobile/gutenberg/node_modules/react-native/android" essentially just pointing out that the node_modules we're interested in now is nested inside the |
There are two items I could use feedback on this PR @mchowning @marecar3
Changes below fix the error, and I'm able to open the editor, but I'm assuming this is here for a reason, and didn't get to dig in yet on whether we need to apply the patch in this specific flow:
|
I can confirm the |
Hey @cameronvoell, I couldn't reproduce the issue that @hypest has experienced while testing an unsupported block on monorepo branches. Also, could you maybe update this branch with the latest develop branch as it has some fixes which are related to an unsupported block project? thanks. |
What are the fixes @marecar3 ? The plan is to not update the monorepo branches unless really needed. The various projects can then target the post-monorepo branches with any fixes or for releasing features. |
Hey @hypest 👋 |
Ah, looks like 12222 has already been merged to WPAndroid develop so, the monorepo PR would need to update to that or we might need to revert 12222 and put it on the "after-1.31" branch. cc @cameronvoell , @mchowning |
Updated this PR to target the gutenberg release branch and did a very quick smoke test of this with the submodule update in e0c2c8e, and the editor is loading well for me with both from-source builds and builds that generate the bundle. 👍 I think we can go ahead and merge this to the release branch.
I'm only seeing a pretty very small fix in WPAndroid with #12222 . If that's it, I'm inclined to favor just keeping it in the release. And we can change our mind later, and still revert it if we want. |
Description
This PR adds the necessary changes for building WordPress-Android using the new Gutenberg/Gutenberg-Mobile Monorepo setup.
Related PR's:
Gutenberg Monorepo PR's for fixing WPAndroid build
Background Info on build changes to stop using jitpack for building GB-Mobile
To test:
PR submission checklist:
RELEASE-NOTES.txt
if necessary.