aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-31 17:30:38 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-31 17:54:04 +0200
commitd391f78c44924a9cd5aee02431825da2ecfb51d3 (patch)
tree537fd4bf6d1cb13862696a08e018a45bc0f80a70
parent6142f5996021eb7199f520bdeb5243321edd65f9 (diff)
downloaddokka-d391f78c44924a9cd5aee02431825da2ecfb51d3.tar.gz
dokka-d391f78c44924a9cd5aee02431825da2ecfb51d3.tar.bz2
dokka-d391f78c44924a9cd5aee02431825da2ecfb51d3.zip
Minor simplification in AnalysisEnvironment
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt9
1 files changed, 5 insertions, 4 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 1523f170..685bfe82 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
@@ -214,9 +214,9 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
override val name: Name = Name.special("<library>")
override val platform: TargetPlatform = targetPlatform
override fun dependencies(): List<ModuleInfo> = listOf(this)
- override fun getLibraryRoots(): Collection<String> = classpath.mapNotNull { libraryFile ->
- libraryFile.absolutePath.takeIf { it !in nativeLibraries }
- }
+ override fun getLibraryRoots(): Collection<String> = classpath
+ .map { libraryFile -> libraryFile.absolutePath }
+ .filter { path -> path !in nativeLibraries }
}
val module = object : ModuleInfo {
@@ -289,7 +289,8 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
)
val projectComponentManager = environment.project as MockComponentManager
projectComponentManager.registerService(
- KotlinCacheService::class.java,
+ KotlinCacheService::
+ class.java,
CoreKotlinCacheService(created)
)