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.4k stars 270 forks source link

runIde or CustomRunIdeTask can't override idea.* properties #1651

Open jonathanlermitage opened 3 weeks ago

jonathanlermitage commented 3 weeks ago

What happened?

I would like to override the idea.log.path when running runIde, using plugin v2.
My build.gradle.kts has:

runIde {
    jvmArgs("-Didea.log.path=custom/logs/")
    jvmArgs("-Pidea.log.path=custom/logs/")
}

then run gradlew runIde.

I also tried

register("myRunIde", CustomRunIdeTask::class) {
    jvmArgs("-Didea.log.path=custom/logs/")
    jvmArgs("-Pidea.log.path=custom/logs/")
}

then run gradlew myRunIde.

The logs are still located in the regular log folder (sandboxed dir / ide version / log). I checked the idea.log.path property with VisualVM, and they are no affected by my changes.
Please note I tried to override both the JVM property and the System property, because when running runIde with no customization, I observed both properties are set.

Relevant log output or stack trace

No response

Steps to reproduce

*

Gradle IntelliJ Plugin version

2.0.0-beta6

Gradle version

8.8

Operating System

Windows

Link to build, i.e. failing GitHub Action job

No response