From b90533c535b6064a22b3eaf217c2827750a99554 Mon Sep 17 00:00:00 2001 From: Trey t Date: Fri, 1 May 2026 18:38:28 -0700 Subject: [PATCH] build: bump Gradle + Kotlin daemon heap for KMP OOMs were happening at the previous limits (Gradle 4G / Kotlin 3G) during ComposeApp.framework generation. Bumped to 6G / 4G with a 1G Metaspace cap and G1GC for steadier latency on incremental builds. Co-Authored-By: Claude Opus 4.7 (1M context) --- gradle.properties | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 5c4ccd0..d80cc14 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,9 +1,17 @@ #Kotlin kotlin.code.style=official -kotlin.daemon.jvmargs=-Xmx3072M +# Heap sizing for KMP builds. +# Kotlin daemon runs the K2 compiler + native linker; 4 GB headroom +# prevents long-tail OOMs during iosArm64 framework link. +# MaxMetaspaceSize caps slow class-loading leaks across daemon reuse; +# G1GC keeps pauses short during incremental builds. +kotlin.daemon.jvmargs=-Xmx4096M -XX:MaxMetaspaceSize=1g -XX:+UseG1GC #Gradle -org.gradle.jvmargs=-Xmx4096M -Dfile.encoding=UTF-8 +# Gradle daemon drives configuration cache + dependency resolution + +# Compose/Android compilers. OOMs at 4 GB during ComposeApp.framework +# generation; 6 GB is the usual safe size for projects this size. +org.gradle.jvmargs=-Xmx6144M -XX:MaxMetaspaceSize=1g -XX:+UseG1GC -Dfile.encoding=UTF-8 org.gradle.configuration-cache=true org.gradle.caching=true