diff --git a/gradle.properties b/gradle.properties index 85bc2ba7da37..5b47fafb59fc 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,5 +9,10 @@ android.nonTransitiveRClass=false android.nonFinalResIds=false #android.debug.obsoleteApi=true -# Minimum max heap space to get reliable builds -org.gradle.jvmargs=-Xmx1g + +# JVM arguments to optimize heap usage, enable heap dump on out-of-memory errors, and set the file encoding +org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8 +kotlin.daemon.jvmargs=-Xmx4096m +org.gradle.caching=true +org.gradle.parallel=true +org.gradle.configureondemand=true