@react-native/gradle-plugin 0.81.0-rc.2 → 0.81.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-native/gradle-plugin",
3
- "version": "0.81.0-rc.2",
3
+ "version": "0.81.0-rc.3",
4
4
  "description": "Gradle Plugin for React Native",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -16,7 +16,7 @@
16
16
  ],
17
17
  "bugs": "https://github.com/facebook/react-native/issues",
18
18
  "engines": {
19
- "node": ">= 22.14.0"
19
+ "node": ">= 20.19.4"
20
20
  },
21
21
  "scripts": {
22
22
  "build": "./gradlew build",
@@ -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")
35
+ if (appPreBuild != null) {
36
+ // Find all other subprojects' preBuild tasks
37
+ val otherPreBuildTasks =
38
+ project.rootProject.subprojects
39
+ .filter { it != appProject }
40
+ .mapNotNull { it.tasks.findByName("preBuild") }
41
+ // Make :app:preBuild depend on all others
42
+ appPreBuild.dependsOn(otherPreBuildTasks)
43
+ }
44
+ }
29
45
  }
30
46
  }