react-native/settings.gradle.kts
Nicola Corti 3a912a3716 Add foojay-resolver-convention to auto-download the right JDK (#38139)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/38139

This adds https://github.com/gradle/foojay-toolchains to our build setup.
This will make sure that if the user doesn't have JDK 17 installed, it will be
autodownloaded once they try to build the first time.

Changelog:
[Internal] [Changed] - Add foojay-resolver-convention to auto-download the right JDK

Reviewed By: sammy-SC

Differential Revision: D47129944

fbshipit-source-id: fd49f6dfe5f87ce3f01e5cce3527144fb96f032a
2023-06-30 05:30:29 -07:00

41 lines
1.2 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.
*/
pluginManagement {
repositories {
mavenCentral()
google()
gradlePluginPortal()
}
}
include(
":packages:react-native:ReactAndroid",
":packages:react-native:ReactAndroid:hermes-engine",
":packages:react-native:ReactAndroid:external-artifacts")
// If the ./packages folder exists, then we're inside the React Native repository.
// If not, a users is consuming this project for a build from source.
if (File("${rootDir}/packages").exists()) {
include(":packages:rn-tester:android:app")
// Include this to enable codegen Gradle plugin.
includeBuild("packages/react-native-gradle-plugin/")
}
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")
}
// 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")
}