Skip to content

Commit

Permalink
rebuild buildCodegenCli task
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjhughes committed Mar 21, 2024
1 parent 044e0ad commit dc292ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
15 changes: 1 addition & 14 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -407,17 +407,7 @@ val prepareKotlinBuildScriptModel by
// We create it here so we can let it depend on preBuild inside the android{}
}

// As ReactAndroid builds from source, the codegen needs to be built before it can be invoked.
// This is not the case for users of React Native, as we ship a compiled version of the codegen.
val buildCodegenCLI by
tasks.registering(BuildCodegenCLITask::class) {
codegenDir.set(file("$rootDir/node_modules/@react-native/codegen"))
bashWindowsHome.set(project.findProperty("react.internal.windowsBashPath").toString())
onlyIf {
// For build from source scenario, we don't need to build the codegen at all.
rootProject.name != "react-native-build-from-source"
}
}


/**
* Finds the path of the installed npm package with the given name using Node's module resolution
Expand Down Expand Up @@ -608,8 +598,6 @@ android {
tasks
.getByName("preBuild")
.dependsOn(
buildCodegenCLI,
"generateCodegenArtifactsFromSchema",
prepareBoost,
prepareDoubleConversion,
prepareFmt,
Expand All @@ -618,7 +606,6 @@ android {
prepareGtest,
prepareJSC,
preparePrefab)
tasks.getByName("generateCodegenSchemaFromJavaScript").dependsOn(buildCodegenCLI)
prepareKotlinBuildScriptModel.dependsOn("preBuild")
prepareKotlinBuildScriptModel.dependsOn(
":packages:react-native:ReactAndroid:hermes-engine:preBuild")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<string name="reactandroid_catalyst_change_bundle_location" project="catalyst" translatable="false">Change Bundle Location</string>
<string name="reactandroid_catalyst_open_debugger_error" project="catalyst" translatable="false">Failed to open debugger. Please check that the dev server is running and reload the app.</string>
<string name="reactandroid_catalyst_debug_open" project="catalyst" translatable="false">Open Debugger</string>
<string name="reactandroid_catalyst_debug_open_disabled" project="catalyst" translatable="false">Connect to the bundler to debug JavaScript</string>
<string name="reactandroid_catalyst_debug_connecting" project="catalyst" translatable="false">Connecting to debugger...</string>
<string name="reactandroid_catalyst_debug_error" project="catalyst" translatable="false">Failed to connect to debugger!</string>
<string name="reactandroid_catalyst_hot_reloading" project="catalyst" translatable="false">Enable Fast Refresh</string>
Expand Down

0 comments on commit dc292ab

Please sign in to comment.