I'm getting a Java heap space error but it's not t...
# community-support
i
I'm getting a Java heap space error but it's not the Gradle daemon. I have
Copy code
org.gradle.jvmargs=-Xmx4g -Xms200m …
which does give 4GB of RAM to the Gradle daemon (
GradleDaemon
) but the one failing is the test worker (
GradleWorkerMain
). How can I increase its heap space?
Found it:
Copy code
tasks.withType<Test> {
	maxHeapSize = "4g"
}
c
you can also change the jvm args directly. note: you should use
.configureEach
instead of the style you used so that your configuration is done lazily
Copy code
tasks.withType<Test>().configureEach {
  jvmArgs("-XX:+EnableDynamicAgentLoading")
👆 1