mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27: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:
parent
c33800b189
commit
6934dec51a
1 changed files with 2 additions and 1 deletions
|
@ -99,7 +99,8 @@ class KotlinPlugin @Inject constructor(val executors: KobaltExecutors, val depen
|
||||||
// IClasspathContributor
|
// IClasspathContributor
|
||||||
|
|
||||||
override fun classpathEntriesFor(project: Project?, context: KobaltContext): List<IClasspathDependency> =
|
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
|
// All Kotlin projects automatically get the Kotlin runtime added to their class path
|
||||||
listOf(kotlinJarFiles.stdlib)
|
listOf(kotlinJarFiles.stdlib)
|
||||||
.map { FileDependency(it.absolutePath) }
|
.map { FileDependency(it.absolutePath) }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue