Updated Branches:
  refs/heads/master fd954adc8 -> 39fc45b8d

CB-5255: Checking in the Google Check, TODO: Add Amazon FireOS check


Project: http://git-wip-us.apache.org/repos/asf/cordova-android/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-android/commit/39fc45b8
Tree: http://git-wip-us.apache.org/repos/asf/cordova-android/tree/39fc45b8
Diff: http://git-wip-us.apache.org/repos/asf/cordova-android/diff/39fc45b8

Branch: refs/heads/master
Commit: 39fc45b8d83802d74c0a38b57456271e4926af6f
Parents: fd954ad
Author: Joe Bowser <[email protected]>
Authored: Wed Nov 20 09:35:23 2013 -0800
Committer: Joe Bowser <[email protected]>
Committed: Wed Nov 20 09:35:23 2013 -0800

----------------------------------------------------------------------
 bin/lib/check_reqs.js | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-android/blob/39fc45b8/bin/lib/check_reqs.js
----------------------------------------------------------------------
diff --git a/bin/lib/check_reqs.js b/bin/lib/check_reqs.js
index f4def79..0697f77 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', '');
     }
 }
 

Reply via email to