File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -463,3 +463,31 @@ Kotlin plugin keeps an [internal list](https://github.com/JetBrains/intellij-com
463
463
of plugins which are known to be compatible with the K2 mode as they do not use Kotlin analysis. The authors of these
464
464
plugins should not be surprised if their plugin already works in the K2 mode. However, it's still advised to declare K2
465
465
support explicitly.
466
+
467
+ ## Testing the plugin in K2 mode locally
468
+
469
+ To test the plugin in K2 mode locally, the ` -Didea.kotlin.plugin.use.k2=true ` VM option should be passed to the running
470
+ IntelliJ IDEA or test process.
471
+
472
+ When using [ IntelliJ Platform Gradle Plugin] ( https://github.com/JetBrains/intellij-platform-gradle-plugin ) , you can
473
+ modify the ` build.gradle.kts ` build script to enable K2 mode in different Gradle tasks:
474
+
475
+ For running in a debug IntelliJ IDEA instance:
476
+
477
+ ``` kotlin
478
+ tasks.named<RunIdeTask >(" runIde" ) {
479
+ jvmArgumentProviders + = CommandLineArgumentProvider {
480
+ listOf (" -Didea.kotlin.plugin.use.k2=true" )
481
+ }
482
+ }
483
+ ```
484
+
485
+ Or for running tests:
486
+
487
+ ``` kotlin
488
+ tasks.test {
489
+ jvmArgumentProviders + = CommandLineArgumentProvider {
490
+ listOf (" -Didea.kotlin.plugin.use.k2=true" )
491
+ }
492
+ }
493
+ ```
You can’t perform that action at this time.
0 commit comments