fix(app): bound Docker APK build memory use

This commit is contained in:
2026-10-24 01:57:57 +01:00
parent 91854148dd
commit 49b92ee012
+11
View File
@@ -17,6 +17,17 @@ case "$kind" in
cp -R build/web/. /out/
;;
apk)
# Flutter's template permits an 8 GiB Gradle heap plus separate Kotlin
# daemons. That exceeds a typical Docker Desktop VM before APK packaging.
# Limit only this private build copy, not native developers' settings.
cat >> android/gradle.properties <<'PROPERTIES'
org.gradle.jvmargs=-Xmx3G -XX:MaxMetaspaceSize=1G -XX:ReservedCodeCacheSize=256m -XX:+HeapDumpOnOutOfMemoryError
org.gradle.workers.max=2
org.gradle.parallel=false
org.gradle.vfs.watch=false
kotlin.compiler.execution.strategy=in-process
PROPERTIES
flutter build apk --release "$@"
cp build/app/outputs/flutter-apk/app-release.apk /out/pipelines.apk
;;