Skip to content

Commit

Permalink
Make it easier for users to build from source if needed (#36165)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cortinico authored and facebook-github-bot committed Feb 15, 2023
1 parent 3418f65 commit 4a07ed2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
},
"files": [
"android",
"build.gradle.kts",
"cli.js",
"flow",
"flow-typed",
"gradle.properties",
"index.js",
"interface.js",
"jest-preset.js",
Expand Down Expand Up @@ -61,6 +63,7 @@
"sdks/.hermesversion",
"sdks/hermes-engine",
"sdks/hermesc",
"settings.gradle.kts",
"template.config.js",
"template",
"!template/node_modules",
Expand Down
15 changes: 8 additions & 7 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ pluginManagement {
}
}

include(
":ReactAndroid",
":ReactAndroid:hermes-engine",
":ReactAndroid:external-artifacts",
":packages:rn-tester:android:app")
include(":ReactAndroid", ":ReactAndroid:hermes-engine", ":ReactAndroid:external-artifacts")

// Include this to enable codegen Gradle plugin.
includeBuild("packages/react-native-gradle-plugin/")
// 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("./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"

Expand Down

0 comments on commit 4a07ed2

Please sign in to comment.