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
This commit is contained in:
Matt Ray 2014-05-08 15:37:09 -04:00 committed by Andrew Grieve
parent 0a3714e5e0
commit 62101e85ff

View File

@ -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', '');
}
}