You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2018/06/30 11:46:56 UTC

[GitHub] raphinesse closed pull request #459: CB-14139 android: Add jvmargs flag for custom values

raphinesse closed pull request #459: CB-14139 android: Add jvmargs flag for custom values
URL: https://github.com/apache/cordova-android/pull/459
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/bin/templates/cordova/lib/build.js b/bin/templates/cordova/lib/build.js
index e33cfae08..fb1d54dbe 100644
--- a/bin/templates/cordova/lib/build.js
+++ b/bin/templates/cordova/lib/build.js
@@ -53,6 +53,7 @@ function parseOpts (options, resolvedTarget, projectRoot) {
         buildMethod: process.env.ANDROID_BUILD || 'studio',
         prepEnv: options.argv.prepenv,
         arch: resolvedTarget && resolvedTarget.arch,
+        jvmargs: (options.argv.jvmargs || '-Xmx2048m'),
         extraArgs: []
     };
 
diff --git a/bin/templates/cordova/lib/builders/GradleBuilder.js b/bin/templates/cordova/lib/builders/GradleBuilder.js
index cec20791b..fb464f714 100644
--- a/bin/templates/cordova/lib/builders/GradleBuilder.js
+++ b/bin/templates/cordova/lib/builders/GradleBuilder.js
@@ -57,7 +57,7 @@ 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');
+    args.push('-Dorg.gradle.jvmargs=' + opts.jvmargs);
     // allow NDK to be used - required by Gradle 1.5 plugin
     args.push('-Pandroid.useDeprecatedNdk=true');
     args.push.apply(args, opts.extraArgs);
diff --git a/bin/templates/cordova/lib/builders/StudioBuilder.js b/bin/templates/cordova/lib/builders/StudioBuilder.js
index 81d9240f9..4cf81f493 100644
--- a/bin/templates/cordova/lib/builders/StudioBuilder.js
+++ b/bin/templates/cordova/lib/builders/StudioBuilder.js
@@ -57,7 +57,7 @@ StudioBuilder.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');
+    args.push('-Dorg.gradle.jvmargs=' + opts.jvmargs);
     // allow NDK to be used - required by Gradle 1.5 plugin
     // args.push('-Pandroid.useDeprecatedNdk=true');
     args.push.apply(args, opts.extraArgs);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org