From 39fc45b8d83802d74c0a38b57456271e4926af6f Mon Sep 17 00:00:00 2001 From: Joe Bowser Date: Wed, 20 Nov 2013 09:35:23 -0800 Subject: [PATCH] CB-5255: Checking in the Google Check, TODO: Add Amazon FireOS check --- bin/lib/check_reqs.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js index f4def798..0697f773 100644 --- a/bin/lib/check_reqs.js +++ b/bin/lib/check_reqs.js @@ -33,8 +33,10 @@ module.exports.get_target = function() { return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', ''); } else if (fs.existsSync(path.join(ROOT, 'project.properties'))) { // if no target found, we're probably in a project and project.properties is in ROOT. - var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties')); - return target.split('=')[1].replace('\n', '').replace('\r', '').replace(' ', ''); + // this is called on the project itself, and can support Google APIs AND Vanilla Android + var target = shell.grep(/target=android-[\d+]/, path.join(ROOT, 'project.properties')) || + shell.grep(/target=Google Inc.:Google APIs:[\d+]/, path.join(ROOT, 'project.properties')); + return target.split('=')[1].replace('\n', '').replace('\r', ''); } }