From afdcdc760f560963fdb48e409470d4119763d10b Mon Sep 17 00:00:00 2001 From: Mike Grabowski Date: Tue, 28 Apr 2020 14:40:25 -0700 Subject: [PATCH] Update react.gradle (#28776) Summary: Running `./gradlew assembleRelease` fails as the path to the CLI contains a new line at the end. We don't run this command in `debug` mode, hence it passed the testing. My bad. Fixed, checked in both `debug` with `bundleInDebug: true` and `release`. Fixes https://github.com/facebook/react-native/issues/28700 ## Changelog [INTERNAL] [ANDROID] - Fix `React.gradle` to build Android apps in production Pull Request resolved: https://github.com/facebook/react-native/pull/28776 Test Plan: Running `./gradlew assembleRelease` works Reviewed By: hramos Differential Revision: D21287789 Pulled By: TheSavior fbshipit-source-id: dc3ec8eef7a919b072b562d2bd455e2f704bc083 --- react.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/react.gradle b/react.gradle index ea3fee2ee6..6441d93f70 100644 --- a/react.gradle +++ b/react.gradle @@ -29,7 +29,7 @@ def detectCliPath(config) { return config.cliPath } - def cliPath = ["node", "-e", "console.log(require('react-native/cli').bin);"].execute([], projectDir).text + def cliPath = ["node", "-e", "console.log(require('react-native/cli').bin);"].execute([], projectDir).text.trim() if (cliPath) { return cliPath