Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow setting Gradle JVM args in Project.xml #1859

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/lime/tools/ProjectXMLParser.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 4 additions & 0 deletions templates/android/template/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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::

Expand Down
1 change: 1 addition & 0 deletions tools/platforms/AndroidPlatform.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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");

Expand Down
Loading