From 3a33f4c0a62291ed4faf444cd4525952f90a0b57 Mon Sep 17 00:00:00 2001 From: Simon MacDonald Date: Thu, 8 Sep 2016 19:00:55 -0400 Subject: [PATCH] Add gradle build flag to enable dex in process for large projects --- bin/templates/cordova/lib/builders/GradleBuilder.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js b/bin/templates/cordova/lib/builders/GradleBuilder.js index 325ea559..46b890e8 100644 --- a/bin/templates/cordova/lib/builders/GradleBuilder.js +++ b/bin/templates/cordova/lib/builders/GradleBuilder.js @@ -55,6 +55,8 @@ GradleBuilder.prototype.getArgs = function(cmd, opts) { // 10 seconds -> 6 seconds args.push('-Dorg.gradle.daemon=true'); + // to allow dex in process + args.push('-Dorg.gradle.jvmargs=-Xmx2048m'); // allow NDK to be used - required by Gradle 1.5 plugin args.push('-Pandroid.useDeprecatedNdk=true'); args.push.apply(args, opts.extraArgs); @@ -189,7 +191,7 @@ GradleBuilder.prototype.build = function(opts) { .progress(function (stdio){ if (stdio.stderr) { /* - * Workaround for the issue with Java printing some unwanted information to + * Workaround for the issue with Java printing some unwanted information to * stderr instead of stdout. * This function suppresses 'Picked up _JAVA_OPTIONS' message from being * printed to stderr. See https://issues.apache.org/jira/browse/CB-9971 for