You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RNGP - Fix a race condition with codegen libraries missing sources (#52803)
Summary:
Pull Request resolved: #52803
I've just realized that our build suffer from a race condition. Specifically
libraries codegen needs to be executed before the app starts the evaluating CMake files.
Otherwise this could lead to a lot of missing files or folders.
Changelog:
[Android] [Fixed] - **rngp:** Fix a race condition with codegen libraries missing sources
Reviewed By: huntie
Differential Revision: D78886347
fbshipit-source-id: f59c201d2eab651bc4a08cf5a795acd379d18186
Copy file name to clipboardExpand all lines: packages/gradle-plugin/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/ReactRootProjectPlugin.kt
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -26,5 +26,21 @@ class ReactRootProjectPlugin : Plugin<Project> {
26
26
it.evaluationDependsOn(":app")
27
27
}
28
28
}
29
+
// We need to make sure that `:app:preBuild` task depends on all other subprojects' preBuild
30
+
// tasks. This is necessary in order to have all the codegen generated code before the CMake
31
+
// configuration build kicks in.
32
+
project.gradle.projectsEvaluated {
33
+
val appProject = project.rootProject.subprojects.find { it.name =="app" }
34
+
val appPreBuild = appProject?.tasks?.findByName("preBuild")
0 commit comments