From 37d12bed40edc226d96d0e1a4b28a24583ece94f Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Wed, 22 Jul 2020 11:12:16 +0200 Subject: DokkaConfiguration: Use `Set` instead of `List` when collections are expected to be distinct --- .../src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt | 2 +- .../main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) (limited to 'kotlin-analysis/src/main/kotlin') diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt index 14067f43..cb65b168 100644 --- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt +++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt @@ -540,7 +540,7 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl * Adds list of paths to source roots. * $list: collection of files to add */ - fun addSources(sourceDirectories: List) { + fun addSources(sourceDirectories: Iterable) { sourceDirectories.forEach { directory -> configuration.addKotlinSourceRoot(directory.path) if (directory.isDirectory || directory.extension == ".java") { diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt index 009bc66c..38b0b69b 100644 --- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt +++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt @@ -22,7 +22,6 @@ internal fun createEnvironmentAndFacade( addSources( (sourceSet.sourceRoots + configuration.sourceSets.filter { it.sourceSetID in sourceSet.dependentSourceSets } .flatMap { it.sourceRoots }) - .map { it.directory } ) loadLanguageVersionSettings(sourceSet.languageVersion, sourceSet.apiVersion) -- cgit