mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 15:12:51 +08:00
Merge branch 'master' into 4.0.x (gradle debug v release)
This commit is contained in:
commit
6eb4409a72
7
bin/templates/cordova/lib/build.js
vendored
7
bin/templates/cordova/lib/build.js
vendored
@ -176,6 +176,11 @@ var builders = {
|
|||||||
'copyDebugLint'
|
'copyDebugLint'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
if (cmd == 'debug') {
|
||||||
|
cmd = 'assembleDebug';
|
||||||
|
} else if (cmd == 'release') {
|
||||||
|
cmd = 'assembleRelease';
|
||||||
|
}
|
||||||
var args = [cmd, '-b', path.join(ROOT, 'build.gradle')];
|
var args = [cmd, '-b', path.join(ROOT, 'build.gradle')];
|
||||||
// 10 seconds -> 6 seconds
|
// 10 seconds -> 6 seconds
|
||||||
args.push('-Dorg.gradle.daemon=true');
|
args.push('-Dorg.gradle.daemon=true');
|
||||||
@ -216,7 +221,7 @@ var builders = {
|
|||||||
build: function(build_type) {
|
build: function(build_type) {
|
||||||
var builder = this;
|
var builder = this;
|
||||||
var wrapper = path.join(ROOT, 'gradlew');
|
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 Q().then(function() {
|
||||||
return spawn(wrapper, args);
|
return spawn(wrapper, args);
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
|
Loading…
Reference in New Issue
Block a user