diff --git a/packages/react-native/ReactAndroid/build.gradle.kts b/packages/react-native/ReactAndroid/build.gradle.kts index 1efd8b930b92c2..80152087c4b331 100644 --- a/packages/react-native/ReactAndroid/build.gradle.kts +++ b/packages/react-native/ReactAndroid/build.gradle.kts @@ -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 @@ -633,8 +623,6 @@ android { tasks .getByName("preBuild") .dependsOn( - buildCodegenCLI, - "generateCodegenArtifactsFromSchema", prepareBoost, prepareDoubleConversion, prepareFmt, @@ -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")