From 6934dec51a3e6f12f33d16723dfa0c707a8d7897 Mon Sep 17 00:00:00 2001 From: Juan Liska Date: Fri, 23 Nov 2018 05:22:49 -0600 Subject: [PATCH] only add stdlib to classpath when project does not specify a kotlin version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit when the project specifies a kotlin version, that version’s stdlib will be added to the classpath by other means --- src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt index 788a8dc2..886f3537 100644 --- a/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt +++ b/src/main/kotlin/com/beust/kobalt/plugin/kotlin/KotlinPlugin.kt @@ -99,7 +99,8 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depen // IClasspathContributor override fun classpathEntriesFor(project: Project?, context: KobaltContext): List = - if (project == null || accept(project)) { + if (project == null || + context.pluginInfo.plugins.any { it is KotlinPlugin && it.settings.kobaltCompilerVersion == null }) { // All Kotlin projects automatically get the Kotlin runtime added to their class path listOf(kotlinJarFiles.stdlib) .map { FileDependency(it.absolutePath) }