The k1 mode is not enabled for local run on 2025.1 EAP

Hi, I want to locally run my plugin in K1 mode on the new IntelliJ IDEA 2025.1 EAP 5 version ( build 251.21418.62). To do this, I add the property -Didea.kotlin.plugin.use.k2=false in builg.gradle.kts, but K1 mode does not get enabled.

tasks.named<RunIdeTask>("runIde") {
    jvmArgumentProviders += CommandLineArgumentProvider {
        listOf("-Didea.kotlin.plugin.use.k2=false")
    }
}

Could you let me know if this is a bug or if I’m doing something wrong?
Below, I’m attaching a test plugin that reproduces the issue.

Thanks for reporting, @Nikita_Iarychenko!
I have reproduced this issue with the IntelliJ Platform version you provided; indeed, something was wrong.
However, when checking it against the 251-EAP-SNAPSHOT, the issue seems to be gone, and the k2 mode is successfully disabled. It looks like this was an issue on the IntelliJ Platform side, but it’s already been addressed.

Not strictly related, but to set a property I usually use something like this:

 runIde {
        this.systemProperty("easygitlab.traceCall", true)
        this.systemProperty("easygitlab.jcefEnabled", false)
        this.systemProperty("easygitlab.pipeline.graph", true)
        //this.systemProperty("easygitlab.pipeline.scheduler", true)
        this.systemProperty("ide.experimental.ui", "true")
        this.systemProperty("ide.show.tips.on.startup.default.value", false)
        this.systemProperty("idea.trust.all.projects", true)
        this.systemProperty("jb.consents.confirmation.enabled", false)
        if (ProductInfo.Launch.OS.current == ProductInfo.Launch.OS.Linux) {
            this.systemProperty("awt.toolkit.name", "WLToolkit")
            this.systemProperty("sun.java2d.vulkan", "True")
        }
    }

Which is the best way to do it?

@m.sciachero Thanks for asking! IntelliJ Platform Gradle Plugin uses “argument providers” to lazily evaluate some values and apply them to the JavaExec process that runs the IDE, tests, etc.
The systemProperty does the same but eagerly and may eventually get replaced with the values that providers apply on the top. Use the jvmArgumentProviders whenever possible.

Also: IntelliJ Platform Gradle Plugin – FAQ | IntelliJ Platform Plugin SDK

1 Like