How to add jvmArgs using kotlin dsl?

Viewed 2324

I need to open some javafx modules and I'm told to put it in the build.gradle.kts. I have no idea how to add jvmArgs to the run task with the kotlin DSL? Can someone show me how please.

1 Answers

You can configure default JVM arguments with JavaApplication extension:

plugins { application }

...

application {
  applicationDefaultJvmArgs = listOf("-Xmx2048m")
}
Related