From 6f7ade1b0f9ee65ce258207fbeeed32fa0e23e69 Mon Sep 17 00:00:00 2001 From: JRK Date: Wed, 17 Aug 2016 17:33:29 -0700 Subject: [PATCH] Add `checkAndroid` back Summary: `checkAndroid` has been lost from my last PR. Finally... [Reminder: https://github.com/facebook/react-native/pull/9190 and https://github.com/facebook/react-native/pull/9448] I've created a new PR from this fresh new cloned repository. I think we're done with this one ! Closes https://github.com/facebook/react-native/pull/9457 Differential Revision: D3731997 fbshipit-source-id: 4ec3285bc43093b23517a36fd952e9cfae832e37 --- local-cli/runAndroid/runAndroid.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/local-cli/runAndroid/runAndroid.js b/local-cli/runAndroid/runAndroid.js index 0a68e1d2e..29a5b8337 100644 --- a/local-cli/runAndroid/runAndroid.js +++ b/local-cli/runAndroid/runAndroid.js @@ -16,6 +16,11 @@ const isPackagerRunning = require('../util/isPackagerRunning'); const Promise = require('promise'); const adb = require('./adb'); +// Verifies this is an Android project +function checkAndroid(root) { + return fs.existsSync(path.join(root, 'android/gradlew')); +} + /** * Starts the app on a connected Android emulator or device. */