mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-19 07:02:51 +08:00
CB-3445 Speed up gradle building (incremental builds go from 10s -> 1.5s for me)
Biggest win is disabling the linter.
This commit is contained in:
parent
404ce8bc3e
commit
effffcba1d
15
bin/templates/cordova/lib/build.js
vendored
15
bin/templates/cordova/lib/build.js
vendored
@ -102,7 +102,22 @@ module.exports.builders = {
|
||||
},
|
||||
gradle: {
|
||||
getArgs: function(cmd) {
|
||||
var lintSteps = [
|
||||
'lint',
|
||||
'lintVitalRelease',
|
||||
'compileLint',
|
||||
'copyReleaseLint',
|
||||
'copyDebugLint'
|
||||
];
|
||||
var args = [cmd, '-b', path.join(ROOT, 'build.gradle')];
|
||||
// 10 seconds -> 6 seconds
|
||||
args.push('-Dorg.gradle.daemon=true');
|
||||
// Excluding lint: 6s-> 1.6s
|
||||
for (var i = 0; i < lintSteps.length; ++i) {
|
||||
args.push('-x', lintSteps[i]);
|
||||
}
|
||||
// Shaves another 100ms, but produces a "try at own risk" warning. Not worth it (yet):
|
||||
// args.push('-Dorg.gradle.parallel=true');
|
||||
return args;
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user