You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by na...@apache.org on 2014/10/02 20:17:59 UTC
[25/29] git commit: CB-7512 Speed up gradle builds by building debug
or release (not both)
CB-7512 Speed up gradle builds by building debug or release (not both)
Project: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/commit/3e18394a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/tree/3e18394a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/diff/3e18394a
Branch: refs/heads/master
Commit: 3e18394a05f669414eaead788f452da142726b18
Parents: db03c8b
Author: Andrew Grieve <ag...@chromium.org>
Authored: Tue Sep 16 14:13:49 2014 -0400
Committer: Prabhjot Singh <pr...@amazon.com>
Committed: Wed Sep 17 22:47:02 2014 +0530
----------------------------------------------------------------------
bin/templates/cordova/lib/build.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cordova-amazon-fireos/blob/3e18394a/bin/templates/cordova/lib/build.js
----------------------------------------------------------------------
diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index 585b7af..e63e342 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -176,6 +176,11 @@ var builders = {
'copyDebugLint'
];
}
+ if (cmd == 'debug') {
+ cmd = 'assembleDebug';
+ } else if (cmd == 'release') {
+ cmd = 'assembleRelease';
+ }
var args = [cmd, '-b', path.join(ROOT, 'build.gradle')];
// 10 seconds -> 6 seconds
args.push('-Dorg.gradle.daemon=true');
@@ -216,7 +221,7 @@ var builders = {
build: function(build_type) {
var builder = this;
var wrapper = path.join(ROOT, 'gradlew');
- var args = builder.getArgs('build');
+ var args = this.getArgs(build_type == 'debug' ? 'debug' : 'release');
return Q().then(function() {
return spawn(wrapper, args);
}).then(function() {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org