@@ -202,9 +202,10 @@ class ReactPlugin : Plugin<Project> {
202202 task.libraryName.set(localExtension.libraryName)
203203 },
204204 onlyIf = { packageJson ->
205- // Please note that appNeedsCodegen is triggering a read of the package.json at
206- // configuration time as we need to feed the onlyIf condition of this task.
207- // Therefore, the appNeedsCodegen needs to be invoked inside this lambda.
205+ // Please note that needsCodegenFromPackageJson is triggering a read of the
206+ // package.json at configuration time as we need to feed the onlyIf condition of this
207+ // task. Therefore, needsCodegenFromPackageJson needs to be invoked inside this
208+ // lambda.
208209 val needsCodegenFromPackageJson =
209210 project.needsCodegenFromPackageJson(rootExtension.root)
210211 val parsedPackageJson = packageJson?.let { JsonUtils .fromPackageJson(it) }
@@ -215,7 +216,7 @@ class ReactPlugin : Plugin<Project> {
215216 )
216217
217218 // We update the android configuration to include the generated sources.
218- // This equivalent to this DSL:
219+ // This is equivalent to this DSL:
219220 //
220221 // android { sourceSets { main { java { srcDirs += "$generatedSrcDir/java" } } } }
221222 if (isLibrary) {
@@ -270,7 +271,7 @@ class ReactPlugin : Plugin<Project> {
270271
271272 tree.exclude(" node_modules/**/*" )
272273 tree.exclude(" **/*.d.ts" )
273- // We want to exclude the build directory, to don't pick them up for execution
274+ // We want to exclude the build directory, to avoid picking them up for execution
274275 // avoidance.
275276 tree.exclude(" **/build/**/*" )
276277 }
@@ -331,9 +332,7 @@ class ReactPlugin : Plugin<Project> {
331332 pureCxxDependencies,
332333 )
333334
334- // We add a task called generateAutolinkingPackageList to do not clash with the existing task
335- // called generatePackageList. This can to be renamed once we unlink the rn <-> cli
336- // dependency.
335+ // We add a task called generateReactNativeEntryPoint to generate the React Native entry point.
337336 val generatePackageListTask =
338337 project.tasks.register(
339338 " generateAutolinkingPackageList" ,
@@ -374,9 +373,8 @@ class ReactPlugin : Plugin<Project> {
374373 .named(" preBuild" , Task ::class .java)
375374 .dependsOn(generateAutolinkingNewArchitectureFilesTask)
376375
377- // We let generateAutolinkingPackageList and generateEntryPoint depend on the preBuild task so
378- // it's executed before
379- // everything else.
376+ // We make preBuild depend on generateAutolinkingPackageList and generateEntryPoint so they run
377+ // before everything else.
380378 project.tasks
381379 .named(" preBuild" , Task ::class .java)
382380 .dependsOn(generatePackageListTask, generateEntryPointTask)
0 commit comments