mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 21:27:46 +00:00
cf914e412d
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/44799 This is the final part of core autolinking: 1. I split RNGP into an `app-plugin` and a `settings-plugin`. This was necessary as the Gradle modules need to be loaded inside the settings.gradle.kts. 2. I've introduced a Settings Plugin to take care of either invoking the `config` command from CLI or receiving a file in input. 3. I've removed the former `RunAutolinkingConfigTask` as now the command is invoked inside the settings plugin 4. I've added hashing computed based on the lockfiles so we won't be re-executing teh `config` command if the lockfiles are not changed. 5. I've updated RN-Tester to use the core autolinking rather than manual linking for the 2 libraries it's using. Changelog:linking [Internal] [Changed] - RNGP - Autolinking. Add support for linking projects Reviewed By: blakef Differential Revision: D58190363 fbshipit-source-id: 6ab8b36729e77ca715f50a4a00aa0ca4eb5b63b1
51 lines
1.4 KiB
Plaintext
51 lines
1.4 KiB
Plaintext
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
import com.facebook.react.ReactSettingsExtension
|
|
|
|
pluginManagement {
|
|
repositories {
|
|
mavenCentral()
|
|
google()
|
|
gradlePluginPortal()
|
|
}
|
|
includeBuild("packages/react-native-gradle-plugin/")
|
|
}
|
|
|
|
include(
|
|
":packages:react-native:ReactAndroid",
|
|
":packages:react-native:ReactAndroid:hermes-engine",
|
|
":packages:react-native:ReactAndroid:external-artifacts",
|
|
":packages:rn-tester:android:app")
|
|
|
|
includeBuild("packages/react-native-gradle-plugin/")
|
|
|
|
dependencyResolutionManagement {
|
|
versionCatalogs {
|
|
create("libs") { from(files("packages/react-native/gradle/libs.versions.toml")) }
|
|
}
|
|
}
|
|
|
|
rootProject.name = "react-native-github"
|
|
|
|
plugins {
|
|
id("com.gradle.enterprise").version("3.7.1")
|
|
id("org.gradle.toolchains.foojay-resolver-convention").version("0.5.0")
|
|
id("com.facebook.react.settings")
|
|
}
|
|
|
|
configure<ReactSettingsExtension> {
|
|
autolinkLibrariesFromCommand(
|
|
workingDirectory = file("packages/rn-tester/"), lockFiles = files("yarn.lock"))
|
|
}
|
|
|
|
// If you specify a file inside gradle/gradle-enterprise.gradle.kts
|
|
// you can configure your custom Gradle Enterprise instance
|
|
if (File("./gradle/gradle-enterprise.gradle.kts").exists()) {
|
|
apply(from = "./gradle/gradle-enterprise.gradle.kts")
|
|
}
|