react-native/settings.gradle.kts
Nicola Corti 13107fa3d0 Import template/android/ as part of the top level build (#32124)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/32124

This Diff adds `template/android/` as part of the top level build as an included
build. This means that the Android template will be loaded inside Android studio and it
will be easier to invoke tasks directly there.

I'm also bumping Gradle to 7.0.2 for the template.

Please note that the template relies on the `template/node_modules` folder to
work correctly, as the Gradle build is loading a file from there.
Therefore I've added a check to verify that we import the build only if `node_modules`
is available.

Changelog:
[Internal] [Changed] - Load template/android/ inside the build.

Reviewed By: ShikaSD

Differential Revision: D30672845

fbshipit-source-id: 7253296b54e1fde7448e0e170d59b244ed9ec8fb
2021-08-31 13:27:27 -07:00

32 lines
789 B
Plaintext

/*
* Copyright (c) Facebook, Inc. and its 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 {
gradlePluginPortal()
mavenLocal()
google()
}
}
include(
":ReactAndroid",
":packages:react-native-codegen:android",
":packages:rn-tester:android:app"
)
// Include this to enable codegen Gradle plugin.
includeBuild("packages/react-native-codegen/android")
includeBuild("packages/react-native-gradle-plugin/")
// Include this to build the Android template as well and make sure is not broken.
if (File("template/node_modules/").exists()) {
includeBuild("template/android/") {
name = "template-android"
}
}