From 582db8d659877cd2c482d485e0ba19913dba3a6a Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Fri, 31 Jul 2020 14:01:49 +0200 Subject: Re/de-shadow kotlin-compiler artifact --- .../dokka/analysis/AnalysisEnvironment.kt | 12 +++----- .../dokka/analysis/CoreProjectFileIndex.kt | 36 +++++++++++++++++++++- 2 files changed, 39 insertions(+), 9 deletions(-) (limited to 'kotlin-analysis/src/main') 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 c8b324a0..e70be408 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 @@ -285,12 +285,11 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl Platform.common -> createCommonResolverForProject( projectContext, module, - library, modulesContent, environment ) - Platform.js -> createJsResolverForProject(projectContext, module, library, modulesContent) - Platform.native -> createNativeResolverForProject(projectContext, module, library, modulesContent) + Platform.js -> createJsResolverForProject(projectContext, module, modulesContent) + Platform.native -> createNativeResolverForProject(projectContext, module, modulesContent) } val libraryModuleDescriptor = resolverForProject.descriptorForModule(library) @@ -355,14 +354,13 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl private fun createCommonResolverForProject( projectContext: ProjectContext, module: ModuleInfo, - library: LibraryModuleInfo, modulesContent: (ModuleInfo) -> ModuleContent, environment: KotlinCoreEnvironment ): ResolverForProject { return object : AbstractResolverForProject( "Dokka", projectContext, - modules = listOf(module, library) + modules = module.dependencies() ) { override fun sdkDependency(module: ModuleInfo): ModuleInfo? = null @@ -394,13 +392,12 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl private fun createJsResolverForProject( projectContext: ProjectContext, module: ModuleInfo, - library: LibraryModuleInfo, modulesContent: (ModuleInfo) -> ModuleContent ): ResolverForProject { return object : AbstractResolverForProject( "Dokka", projectContext, - modules = listOf(module, library) + modules = module.dependencies() ) { override fun modulesContent(module: ModuleInfo): ModuleContent = modulesContent(module) override fun createResolverForModule( @@ -425,7 +422,6 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl private fun createNativeResolverForProject( projectContext: ProjectContext, module: ModuleInfo, - library: LibraryModuleInfo, modulesContent: (ModuleInfo) -> ModuleContent ): ResolverForProject { return object : AbstractResolverForProject( diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt index d0e0bb4f..346a305e 100644 --- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt +++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/CoreProjectFileIndex.kt @@ -1,7 +1,6 @@ package org.jetbrains.dokka.analysis import com.intellij.openapi.Disposable -import com.intellij.openapi.components.BaseComponent import com.intellij.openapi.extensions.ExtensionPointName import com.intellij.openapi.module.Module import com.intellij.openapi.project.Project @@ -54,6 +53,17 @@ class CoreProjectFileIndex(private val project: Project, contentRoots: List