Skip to content

Commit 4a07ed2

Browse files
cortinicofacebook-github-bot
authored andcommitted
Make it easier for users to build from source if needed (#36165)
Summary: This page is not up to date anymore: https://reactnative.dev/contributing/how-to-build-from-source I'm pushing those changes to make it easier to consume our build when building from source. I'll update the page those change lands. ## Changelog [Internal] [Changed] - Make it easier for users to build from source if needed Pull Request resolved: #36165 Test Plan: If the CI is green, we should be good to merge this Reviewed By: cipolleschi Differential Revision: D43303867 Pulled By: cortinico fbshipit-source-id: c0080b06cbcbf872ee92fcfa82a9f823d5b247f4
1 parent 3418f65 commit 4a07ed2

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
},
1717
"files": [
1818
"android",
19+
"build.gradle.kts",
1920
"cli.js",
2021
"flow",
2122
"flow-typed",
23+
"gradle.properties",
2224
"index.js",
2325
"interface.js",
2426
"jest-preset.js",
@@ -61,6 +63,7 @@
6163
"sdks/.hermesversion",
6264
"sdks/hermes-engine",
6365
"sdks/hermesc",
66+
"settings.gradle.kts",
6467
"template.config.js",
6568
"template",
6669
"!template/node_modules",

settings.gradle.kts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,15 @@ pluginManagement {
1313
}
1414
}
1515

16-
include(
17-
":ReactAndroid",
18-
":ReactAndroid:hermes-engine",
19-
":ReactAndroid:external-artifacts",
20-
":packages:rn-tester:android:app")
16+
include(":ReactAndroid", ":ReactAndroid:hermes-engine", ":ReactAndroid:external-artifacts")
2117

22-
// Include this to enable codegen Gradle plugin.
23-
includeBuild("packages/react-native-gradle-plugin/")
18+
// If the ./packages folder exists, then we're inside the React Native repository.
19+
// If not, a users is consuming this project for a build from source.
20+
if (File("./packages").exists()) {
21+
include(":packages:rn-tester:android:app")
22+
// Include this to enable codegen Gradle plugin.
23+
includeBuild("packages/react-native-gradle-plugin/")
24+
}
2425

2526
rootProject.name = "react-native-github"
2627

0 commit comments

Comments
 (0)