diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-07-22 11:12:16 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-14 17:51:11 +0200 |
commit | 37d12bed40edc226d96d0e1a4b28a24583ece94f (patch) | |
tree | 424ec0e7f60fc9a9c0eb9a9747a99faea714fdf9 /kotlin-analysis/src/main | |
parent | eae1ce49d18c2978b49166ea502bf2c109a85504 (diff) | |
download | dokka-37d12bed40edc226d96d0e1a4b28a24583ece94f.tar.gz dokka-37d12bed40edc226d96d0e1a4b28a24583ece94f.tar.bz2 dokka-37d12bed40edc226d96d0e1a4b28a24583ece94f.zip |
DokkaConfiguration: Use `Set` instead of `List` when collections are expected to be distinct
Diffstat (limited to 'kotlin-analysis/src/main')
-rw-r--r-- | kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt | 2 | ||||
-rw-r--r-- | kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt | 1 |
2 files changed, 1 insertions, 2 deletions
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<File>) { + fun addSources(sourceDirectories: Iterable<File>) { 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) |