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:

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:

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.