2

I wonder how to increase heap size of Gradle Daemon process that IntelliJ IDEA uses to Sync project?

Current process uses -Xms256m -Xmx512m

I've already changed gradle-wrapper.properties file to:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
org.gradle.jvmargs=-Xms4g -Xmx4g -XX:MaxPermSize=2048m

My IntelliJ IDEA settings: enter image description here enter image description here

Artiom Saidanov
  • 286
  • 1
  • 3
  • 13

2 Answers2

2

The file gradle-wrapper.properties is for the wrapper scripts only. The org.gradle.jvmarg option doesn't belong in there.

Rather, put it in a gradle.properties file in the project root directory. See here for more information.

Also be aware that XX:MaxPermSize is not supported since Java 8.

Lastly, you may need to also raise the heap used by IntelliJ itself. Check the current usage by right-clicking on the status bar and select Memory Indicator:

enter image description here

Notice the current and max heap in the bar to the right. If it is close to full, you can change the heap size under Help -> Change Memory Settings:

enter image description here

The memory settings you showed is for the IntelliJ compiler. But as you can see from the Gradle settings you also showed, you delegate the build to Gradle. So this has no effect.

Bjørn Vester
  • 6,851
  • 1
  • 20
  • 20
0

you can try this to give more heap memory to IntelliJ.

Hope you question is resolved.