diff --git a/gradle.properties b/gradle.properties index e3461bd0..5ff2de48 100644 --- a/gradle.properties +++ b/gradle.properties @@ -27,8 +27,14 @@ kotlin.code.style=official # signed by an unexpected publisher. BITCHAT_GITHUB_RELEASE_CERT_SHA256=3b03fa66a5451321100792f5b55a7b4966d5c8dc10c6daa40aa95ea489531bca -# JVM heap size configuration to prevent OutOfMemoryError -org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError +# JVM heap size configuration to prevent OutOfMemoryError. +# Metaspace is 1g rather than 512m: KSP and the Hilt/Dagger annotation +# processors load a large amount of extra classes into the daemon, and at 512m +# a combined test + lint + KSP invocation across the modules exhausts it. The +# failure surfaces as ClassLoader.defineClass OutOfMemoryError in unrelated +# tasks, and can truncate gradle/verification-metadata.xml if it lands during +# a --write-verification-metadata run. +org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError # Enabled parallel sync for Gradle 9.4+ org.gradle.tooling.parallel=true