From 62101e85ffeed6620ae940f76cf51149aec54cf2 Mon Sep 17 00:00:00 2001 From: Matt Ray Date: Thu, 8 May 2014 15:37:09 -0400 Subject: [PATCH] Update to check for Google Glass APIs This prevents the 'cordova build android' process from blowing up on this step if you assign the GDK as the target and want to rebuild via the CLI. close #100 --- bin/lib/check_reqs.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js index 91875f5c..a4ad3ad6 100644 --- a/bin/lib/check_reqs.js +++ b/bin/lib/check_reqs.js @@ -36,6 +36,10 @@ module.exports.get_target = function() { // 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')); + if(target == "" || !target) { + // Try Google Glass APIs + target = shell.grep(/target=Google Inc.:Glass Development Kit Preview:[\d+]/, path.join(ROOT, 'project.properties')); + } return target.split('=')[1].replace('\n', '').replace('\r', ''); } }