Skip to content

Commit

Permalink
CB-3445 Speed up gradle building (incremental builds go from 10s -> 1…
Browse files Browse the repository at this point in the history
….5s for me)

Biggest win is disabling the linter.
  • Loading branch information
agrieve committed Aug 18, 2014
1 parent 404ce8b commit effffcb
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions bin/templates/cordova/lib/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
},

Expand Down

0 comments on commit effffcb

Please sign in to comment.