From 9442009d911835e94fb5623bd08a019518c479f9 Mon Sep 17 00:00:00 2001 From: Sebastian Sellmair Date: Thu, 6 Apr 2023 16:25:16 +0200 Subject: [PATCH] [Gradle][Minor] Add comments for IdeCompilerArgumentsResolverImpl KTIJ-24976 --- .../plugin/ide/IdeCompilerArgumentsResolverImpl.kt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/IdeCompilerArgumentsResolverImpl.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/IdeCompilerArgumentsResolverImpl.kt index 19a1d118fb7..4e22c4714e1 100644 --- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/IdeCompilerArgumentsResolverImpl.kt +++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/plugin/ide/IdeCompilerArgumentsResolverImpl.kt @@ -32,7 +32,19 @@ internal class IdeCompilerArgumentsResolverImpl( isLenient = true, includeArgumentTypes = setOfNotNull( KotlinCompilerArgumentsProducer.ArgumentType.Primitive, + + /* + Always resolve the plugin classpath: This is still consumed by the associated IDE plugins. + e.g: the kotlinx.serialisation IDE plugin relies on this classpath. + */ KotlinCompilerArgumentsProducer.ArgumentType.PluginClasspath, + + /* + Dependency Classpath is required for IDE import to provide the ability to compile + the given Gradle project using 'jps'. This is only supported by the jvm Kotlin plugin + and does not work for Multiplatform or Android projects: + Therefore, we omit the classpath for multiplatform and Android projects + */ KotlinCompilerArgumentsProducer.ArgumentType.DependencyClasspath .takeIf { extension !is KotlinMultiplatformExtension } .takeIf { producer is KotlinCompile }