1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-25 07:57:12 -07:00

only add stdlib to classpath when project does not specify a kotlin version

when the project specifies a kotlin version, that version’s stdlib will be added to the classpath by other means
This commit is contained in:
Juan Liska 2018-11-23 05:22:49 -06:00
parent c33800b189
commit 6934dec51a

View file

@ -99,7 +99,8 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depen
// IClasspathContributor
override fun classpathEntriesFor(project: Project?, context: KobaltContext): List<IClasspathDependency> =
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) }