JetBrains / intellij-platform-gradle-plugin

Gradle plugin for building plugins for IntelliJ-based IDEs
https://plugins.jetbrains.com/docs/intellij/gradle-prerequisites.html
Apache License 2.0
1.43k stars 270 forks source link

Can't pass JVM arguments to runIde task #900

Closed derteufelqwe closed 2 years ago

derteufelqwe commented 2 years ago

Expected behaviour I can somehow add arguments to the JVM.

Actual behaviour Tells me that my Argument is unrecognized

Reproduce the issue

What this should do is to enable hotswap agent for the IDE project for advanced code hotswapping. But with this setup, I get the error that the VM option HotswapAgent is not recognized

hsz commented 2 years ago

How do you specify the JBR you want to use in runIde task?

With the Gradle IntelliJ Plugin v1.4.0, there's the jbrVariant property introduced for that task.

derteufelqwe commented 2 years ago

I've taken a look ath jbr and when specifying it correctly, everything works. Thanks. Doesn't the IDE get launched with the same JRE I run the gradle / guild tasks with?

hsz commented 2 years ago

Would you be able to provide the valid config?

runIde task, as well as other ones based on the RunIdeBase, use JbrResolver to find out which Java Runtime to use. There are the following cases checked: