Skip to content

Commit

Permalink
point react gradle config to monorepo (#44901)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #44901

Point Gradle to the monorepo instead of a node_modules, as well as remove some commented out entries we're not interested in.

Changelog: [Internal]

Reviewed By: cortinico

Differential Revision: D58287786
  • Loading branch information
blakef authored and facebook-github-bot committed Jun 12, 2024
1 parent 31136f5 commit 94ca2c2
Showing 1 changed file with 12 additions and 28 deletions.
40 changes: 12 additions & 28 deletions packages/helloworld/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,36 +9,20 @@ apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"

/**
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
*/
def generatedConfig = file("../../.react-native.config").getText().replaceAll("HELLOWORLD_PATH", project.file("../../").absolutePath)

react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")

/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]

/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
// nodeExecutableAndArgs = ["node"]
//
// The command to run when bundling. By default is 'bundle'
// bundleCommand = "ram-bundle"
//
// The path to the CLI configuration file. Default is empty.
// bundleConfig = file(../rn-cli.config.js)
root = file("../")
reactNativeDir = file("../../../react-native")
codegenDir = file("../../../react-native-codegen")
// Our simplified bundle wrapper.
cliFile = file("../../scripts/bundle.js")
bundleCommand = ""
extraPackagerArgs = [
"--load-config",
generatedConfig
]
//
// The name of the generated asset file containing your JS bundle
// bundleAssetName = "MyApplication.android.bundle"
Expand Down

0 comments on commit 94ca2c2

Please sign in to comment.