This message was deleted.
# community-support
s
This message was deleted.
f
Copy code
tasks.withType<JavaCompile> {
    options.encoding = "UTF-8"
    with(options.forkOptions) {
        memoryMaximumSize = "4096m"
    }
}
I tried to setup as such but failed with
Copy code
Unrecognized option: -J-Xmx4096m
Error: Could not create the Java Virtual Machine.
Seems the correct way, or another way is by doing
Copy code
options.compilerArgs = listOf("-Xms2048m", "-Xmx4096m")
In there, but this seem not really working as I saw this basically just adds some parameters into a config file that is send to the eclipse compiler java process, that java process seems still not have much memory increased.
Seems I can do it as this instead
Copy code
options.forkOptions.jvmArgs =  listOf("-Xms2048m", "-Xmx4096m")
not quite sure what's the difference with the
with
used above...