[kotlin] enable Kotlin plugin K2 mode by default in Nightly

The behavior with the `idea.kotlin.plugin.use.k2` VM option will be the following:
- When no `idea.kotlin.plugin.use.k2` is specified in `.vmoptions`, it will be implicitly set to `true`.
- If `idea.kotlin.plugin.use.k2` is set to `true`/`false` in `.vmoptions`, this value will be used.
- If a user disables K2 mode manually in the settings, then `idea.kotlin.plugin.use.k2` will be set to `false` in `.vmoptions` and the K2 mode will be considered as disabled after a restart.

^KTIJ-30761 fixed

GitOrigin-RevId: bdafaad289b4e6ad3600f0653b336aefde20874f
This commit is contained in:
Ilya Kirillov
2024-07-28 20:47:02 +00:00
committed by intellij-monorepo-bot
parent e752c1c3c7
commit d915daf9be
2 changed files with 9 additions and 0 deletions
@@ -81,6 +81,7 @@ open class IdeaCommunityProperties(private val communityHomeDir: Path) : BaseIde
buildDocAuthoringAssets = true
qodanaProductProperties = QodanaProductProperties("QDJVMC", "Qodana Community for JVM")
enableKotlinPluginK2ByDefault()
}
override suspend fun copyAdditionalFiles(context: BuildContext, targetDir: Path) {
@@ -170,4 +170,12 @@ abstract class BaseIdeaProperties : JetBrainsProductProperties() {
additionalModulesToCompile = persistentListOf("intellij.tools.jps.build.standalone")
modulesToCompileTests = persistentListOf("intellij.platform.jps.build.tests")
}
/**
* 🌲
* see KTIJ-30761
*/
protected fun enableKotlinPluginK2ByDefault() {
additionalVmOptions += "-Didea.kotlin.plugin.use.k2=true"
}
}