Skip to content

Commit dfb3f10

Browse files
committed
Tweak gradle build properties for Qt bootstrap
- Sometimes a flaky Java heap out of memory error is throw. By, tweaking the memory setting we can get rid of that error.
1 parent 35118f4 commit dfb3f10

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

pythonforandroid/bootstraps/common/build/build.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,8 @@ def make_package(args):
572572
render(
573573
'gradle.tmpl.properties',
574574
'gradle.properties',
575-
args=args)
575+
args=args,
576+
bootstrap_name=get_bootstrap_name())
576577

577578
# ant build templates
578579
render(

pythonforandroid/bootstraps/common/build/templates/gradle.tmpl.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
{% if bootstrap_name == "qt" %}
2+
# For tweaking memory settings. Otherwise, a p4a session with Qt bootstrap and PySide6 recipe
3+
# terminates with a Java out of memory exception
4+
org.gradle.jvmargs=-Xmx2500m -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
5+
{% endif %}
16
{% if args.enable_androidx %}
27
android.useAndroidX=true
38
android.enableJetifier=true

0 commit comments

Comments
 (0)