Skip to content

Commit

Permalink
Remove import of com.facebook.react.ReactSettingsExtension (#44850)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44850

I'm removing this line from settings.gradle:
```
import com.facebook.react.ReactSettingsExtension
```
and just using a fully qualified class name in the `configure{}` block
as imports cannot be conditionally included and is making hard for RNTA
to integrated those changes.

Changelog:
[Internal] [Changed] - Remove import of `com.facebook.react.ReactSettingsExtension`

Reviewed By: huntie

Differential Revision: D58354443

fbshipit-source-id: bc45516661318021a042e1c5921e28d7217cacbc
  • Loading branch information
cortinico authored and facebook-github-bot committed Jun 10, 2024
1 parent 6937c70 commit feeb4b7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
3 changes: 1 addition & 2 deletions packages/helloworld/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
*/

// Autolinking has now moved into the React Native Gradle Plugin
import com.facebook.react.ReactSettingsExtension
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }

rootProject.name = 'HelloWorld'
include ':app'
Expand Down
3 changes: 1 addition & 2 deletions packages/react-native/template/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import com.facebook.react.ReactSettingsExtension
pluginManagement { includeBuild("../node_modules/@react-native/gradle-plugin") }
plugins { id("com.facebook.react.settings") }
extensions.configure(ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
extensions.configure(com.facebook.react.ReactSettingsExtension){ ex -> ex.autolinkLibrariesFromCommand() }
rootProject.name = 'HelloWorld'
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
4 changes: 1 addition & 3 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
* LICENSE file in the root directory of this source tree.
*/

import com.facebook.react.ReactSettingsExtension

pluginManagement {
repositories {
mavenCentral()
Expand Down Expand Up @@ -38,7 +36,7 @@ plugins {
id("com.facebook.react.settings")
}

configure<ReactSettingsExtension> {
configure<com.facebook.react.ReactSettingsExtension> {
autolinkLibrariesFromCommand(
workingDirectory = file("packages/rn-tester/"), lockFiles = files("yarn.lock"))
}
Expand Down

0 comments on commit feeb4b7

Please sign in to comment.