aboutsummaryrefslogtreecommitdiff
path: root/kotlin-analysis/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'kotlin-analysis/src/main')
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/EnvironmentAndFacade.kt9
1 files changed, 4 insertions, 5 deletions
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 ea8ce2f6..9726e5b7 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
@@ -17,12 +17,11 @@ internal fun createEnvironmentAndFacade(
if (analysisPlatform == Platform.jvm) {
addClasspath(PathUtil.getJdkClassesRootsFromCurrentJre())
}
- sourceSet.classpath.forEach(::addClasspath)
- addSources(
- (sourceSet.sourceRoots + sourceSets.filter { it.sourceSetID in sourceSet.dependentSourceSets }
- .flatMap { it.sourceRoots })
- )
+ val parentSourceSets = sourceSets.filter { it.sourceSetID in sourceSet.dependentSourceSets }
+ addClasspath(sourceSet.classpath + parentSourceSets.flatMap { it.classpath })
+
+ addSources(sourceSet.sourceRoots + parentSourceSets.flatMap { it.sourceRoots })
loadLanguageVersionSettings(sourceSet.languageVersion, sourceSet.apiVersion)