Hello,
I am using IntelliJ IDEA 2025.1 EAP and I noticed several issues with my plugin when enabling the K2 mode:
-
the plugin is not flagged as compatible with K2 mode, but when I enable the K2 mode the plugin is still enabled, no message or indication displayed. I did not explicitly set the
supportsK2
boolean to false but according to the documentation it should be false by default. -
one of the purpose of the plugin is to remove the JDK from the classpath (we have our own implementation for the embedded world). When the plugin and K2 mode are enabled, the
.kts
files are marked with a lot of errors such asCannot access 'java. lang. Object' which is a supertype of 'org. gradle. kotlin. dsl. PluginDependenciesSpecScope'. Check your module classpath for missing or conflicting dependencies.
The build still work, I can load the project successfully, and run the Gradle task, but the completion does not work anymore. There is no problem with the K1 mode. Is there a way to support such a case with K2 mode?
Thanks!