From feeb4b773b03decd90a494850eb2963f85b3b54d Mon Sep 17 00:00:00 2001 From: Nicola Corti Date: Mon, 10 Jun 2024 03:26:34 -0700 Subject: [PATCH] Remove import of `com.facebook.react.ReactSettingsExtension` (#44850) Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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 --- packages/helloworld/android/settings.gradle | 3 +-- packages/react-native/template/android/settings.gradle | 3 +-- settings.gradle.kts | 4 +--- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/helloworld/android/settings.gradle b/packages/helloworld/android/settings.gradle index 0a791606d8ee08..e80fcd06cffba2 100644 --- a/packages/helloworld/android/settings.gradle +++ b/packages/helloworld/android/settings.gradle @@ -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' diff --git a/packages/react-native/template/android/settings.gradle b/packages/react-native/template/android/settings.gradle index 175ced1adbd1c1..09c4abaf9093ed 100644 --- a/packages/react-native/template/android/settings.gradle +++ b/packages/react-native/template/android/settings.gradle @@ -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') diff --git a/settings.gradle.kts b/settings.gradle.kts index 7e8e500fbd7b8f..8a1333bb7e500e 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -5,8 +5,6 @@ * LICENSE file in the root directory of this source tree. */ -import com.facebook.react.ReactSettingsExtension - pluginManagement { repositories { mavenCentral() @@ -38,7 +36,7 @@ plugins { id("com.facebook.react.settings") } -configure { +configure { autolinkLibrariesFromCommand( workingDirectory = file("packages/rn-tester/"), lockFiles = files("yarn.lock")) }