Skip to content

Commit

Permalink
Back out "fix: prevent error when react extension was already created" (
Browse files Browse the repository at this point in the history
facebook#43753)

Summary:
Pull Request resolved: facebook#43753

New build failures when this was merged seem likely related.

```
FAILURE: Build failed with an exception.

* Where:
Build file '/root/react-native/packages/react-native/ReactAndroid/build.gradle.kts' line: 784

* What went wrong:
Script compilation errors:

  Line 784: react {
            ^ Unresolved reference: react

  Line 787:   libraryName = "rncore"
              ^ Unresolved reference: libraryName

  Line 788:   jsRootDir = file("../src")
              ^ Unresolved reference: jsRootDir
```

Changelog: [Internal]

Reviewed By: arushikesarwani94

Differential Revision: D55618667

fbshipit-source-id: 1a188ba31b013863f3d46a773ff3ebbdd5f696cb
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Apr 2, 2024
1 parent 08f5747 commit 2477fbc
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ import org.gradle.internal.jvm.Jvm
class ReactPlugin : Plugin<Project> {
override fun apply(project: Project) {
checkJvmVersion(project)
val extension =
project.rootProject.extensions.findByType(ReactExtension::class.java)
?: project.rootProject.extensions.create("react", ReactExtension::class.java, project)

val extension = project.extensions.create("react", ReactExtension::class.java, project)
checkIfNewArchFlagIsSet(project, extension)

// We register a private extension on the rootProject so that project wide configs
Expand Down

0 comments on commit 2477fbc

Please sign in to comment.