diff --git a/src/lime/tools/ProjectXMLParser.hx b/src/lime/tools/ProjectXMLParser.hx index 687015c776..f28c45fd66 100644 --- a/src/lime/tools/ProjectXMLParser.hx +++ b/src/lime/tools/ProjectXMLParser.hx @@ -1738,10 +1738,13 @@ class ProjectXMLParser extends HXProject case "gradle-version": config.set("android.gradle-version", value); - + case "gradle-plugin": config.set("android.gradle-plugin", value); + case "gradle-jvmargs": + config.set("android.gradle-jvmargs", value); + default: name = formatAttributeName(attribute); } diff --git a/templates/android/template/gradle.properties b/templates/android/template/gradle.properties index a1cbbf4260..e4252ab1d8 100644 --- a/templates/android/template/gradle.properties +++ b/templates/android/template/gradle.properties @@ -13,6 +13,10 @@ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects # org.gradle.parallel=true +::if (ANDROID_GRADLE_JVMARGS != ""):: +org.gradle.jvmargs=::ANDROID_GRADLE_JVMARGS:: +::end:: + VERSION_NAME=::META_VERSION:: VERSION_CODE=::META_BUILD_NUMBER:: diff --git a/tools/platforms/AndroidPlatform.hx b/tools/platforms/AndroidPlatform.hx index 4d4caaaf12..79a8133214 100644 --- a/tools/platforms/AndroidPlatform.hx +++ b/tools/platforms/AndroidPlatform.hx @@ -475,6 +475,7 @@ class AndroidPlatform extends PlatformTarget ]); context.ANDROID_GRADLE_VERSION = project.config.getString("android.gradle-version", "7.4.2"); context.ANDROID_GRADLE_PLUGIN = project.config.getString("android.gradle-plugin", "7.3.1"); + context.ANDROID_GRADLE_JVMARGS = project.config.getString("android.gradle-jvmargs", ""); context.ANDROID_USE_ANDROIDX = project.config.getString("android.useAndroidX", "true"); context.ANDROID_ENABLE_JETIFIER = project.config.getString("android.enableJetifier", "false");