aboutsummaryrefslogtreecommitdiff
path: root/kotlin-analysis
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2021-01-15 16:04:28 +0100
committerKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2021-01-22 10:38:05 +0100
commit88303321abb91b73a03fa62f44152e82fef0dc3a (patch)
treefebaedb3cebb27fcaf11377468a5a6ac99a52d5f /kotlin-analysis
parentfdf8a298f586d7e334c312346b70b59c64c8d037 (diff)
downloaddokka-88303321abb91b73a03fa62f44152e82fef0dc3a.tar.gz
dokka-88303321abb91b73a03fa62f44152e82fef0dc3a.tar.bz2
dokka-88303321abb91b73a03fa62f44152e82fef0dc3a.zip
Fix incorrect DRI conversion in KotlinAsJava modes for nested definitions
Diffstat (limited to 'kotlin-analysis')
-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)