Skip to content

Commit

Permalink
rebuild buildCodegenCli task
Browse files Browse the repository at this point in the history
  • Loading branch information
alanjhughes authored and gabrieldonadel committed Aug 16, 2024
1 parent 52febfc commit d42b394
Showing 1 changed file with 1 addition 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 @@ -428,17 +428,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 @@ -633,8 +623,6 @@ android {
tasks
.getByName("preBuild")
.dependsOn(
buildCodegenCLI,
"generateCodegenArtifactsFromSchema",
prepareBoost,
prepareDoubleConversion,
prepareFmt,
Expand All @@ -643,7 +631,6 @@ android {
prepareGtest,
prepareJSC,
preparePrefab)
tasks.getByName("generateCodegenSchemaFromJavaScript").dependsOn(buildCodegenCLI)
prepareKotlinBuildScriptModel.dependsOn("preBuild")
prepareKotlinBuildScriptModel.dependsOn(
":packages:react-native:ReactAndroid:hermes-engine:preBuild")
Expand Down

0 comments on commit d42b394

Please sign in to comment.