# Overriding Gradle Daemon jvmargs - Tadeas Kriz

DevFeed: [Overriding Gradle Daemon jvmargs - Tadeas Kriz](<https://devfeed.tech/articles/overriding-gradle-daemon-jvmargs-tadeas-kriz-38213.md>)

Original publisher: [Read original article](<https://touchlab.co/gradle-jvmargs>)

Published: 2024-05-02T00:00:00Z

Content type: tutorial

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Gradle](<https://devfeed.tech/topics/gradle.md>), [builds](<https://devfeed.tech/topics/builds.md>), [Kotlin Multiplatform](<https://devfeed.tech/topics/kotlin-multiplatform.md>), [debugging](<https://devfeed.tech/topics/debugging.md>)

Tags: [build](<https://devfeed.tech/tags/build.md>), [builds](<https://devfeed.tech/tags/builds.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [github-actions](<https://devfeed.tech/tags/github-actions.md>), [gradle](<https://devfeed.tech/tags/gradle.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [kotlin-multiplatform](<https://devfeed.tech/tags/kotlin-multiplatform.md>), [optimize](<https://devfeed.tech/tags/optimize.md>)

## AI overview

This tutorial explains that setting org.gradle.jvmargs can replace Gradle's default JVM arguments instead of extending them. It recommends preserving the defaults and then adding memory or garbage-collection options, while keeping MaxMetaspaceSize and MaxDirectMemorySize limits to avoid daemon instability and excessive native memory use.

## Source excerpt

Giving Gradle more memory is a common practice, but it can lead to unexpected behavior. This post explains how to properly set org.gradle.jvmargs.