cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject git commit: CB-5715 Pass --cli flag to android create script
Date Thu, 02 Jan 2014 21:40:26 GMT
Updated Branches:
  refs/heads/master 018fac254 -> bdb2a211a


CB-5715 Pass --cli flag to android create script


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

Branch: refs/heads/master
Commit: bdb2a211adcec424d94b1be292de8fc11eaa4ebc
Parents: 018fac2
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Thu Jan 2 16:39:55 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Thu Jan 2 16:39:55 2014 -0500

----------------------------------------------------------------------
 src/platform.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-cli/blob/bdb2a211/src/platform.js
----------------------------------------------------------------------
diff --git a/src/platform.js b/src/platform.js
index 195b87c..31a9557 100644
--- a/src/platform.js
+++ b/src/platform.js
@@ -234,7 +234,12 @@ function call_into_create(target, projectRoot, cfg, libDir, template_dir)
{
             // Create a platform app using the ./bin/create scripts that exist in each repo.
             var bin = path.join(libDir, 'bin', 'create');
             var args = '';
-            if (target == 'ios') {
+            if (target == 'android') {
+                var platformVersion = fs.readFileSync(path.join(libDir, 'VERSION'), 'UTF-8').trim();
+                if (semver.gt(platformVersion, '3.3.0')) {
+                    args = '--cli';
+                }
+            } else if (target == 'ios') {
                 var platformVersion = fs.readFileSync(path.join(libDir, 'CordovaLib', 'VERSION'),
'UTF-8').trim();
                 args = '--arc';
                 if (semver.gt(platformVersion, '3.3.0')) {


Mime
View raw message