From dcf4600a7c5a06bb0a3fbf14ee49c515781f330e Mon Sep 17 00:00:00 2001 From: farwayer Date: Mon, 21 Mar 2016 09:20:13 -0700 Subject: [PATCH] Using local-cli in gradle Summary:Same as d87d127 but for gradle. It will help to prevent installing global `react-native-cli` (more simple CI server configuration for ex.) Tested on Linux and Windows. Closes https://github.com/facebook/react-native/pull/6272 Differential Revision: D3076101 Pulled By: foghina fb-gh-sync-id: 89c3870536b1ce3fdbb909909b887f3ce68b2951 shipit-source-id: 89c3870536b1ce3fdbb909909b887f3ce68b2951 --- local-cli/generator-android/templates/src/app/react.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/local-cli/generator-android/templates/src/app/react.gradle b/local-cli/generator-android/templates/src/app/react.gradle index 348fb127368b9e..850e40d4650117 100644 --- a/local-cli/generator-android/templates/src/app/react.gradle +++ b/local-cli/generator-android/templates/src/app/react.gradle @@ -72,10 +72,10 @@ gradle.projectsEvaluated { // Set up dev mode def devEnabled = !targetName.toLowerCase().contains("release") if (Os.isFamily(Os.FAMILY_WINDOWS)) { - commandLine "cmd", "/c", "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}", + commandLine "cmd", "/c", "node", "node_modules/react-native/local-cli/cli.js", "bundle", "--platform", "android", "--dev", "${devEnabled}", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir } else { - commandLine "react-native", "bundle", "--platform", "android", "--dev", "${devEnabled}", + commandLine "node", "node_modules/react-native/local-cli/cli.js", "bundle", "--platform", "android", "--dev", "${devEnabled}", "--entry-file", entryFile, "--bundle-output", jsBundleFile, "--assets-dest", resourcesDir }