diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-07-31 17:30:38 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-31 17:54:04 +0200 |
commit | d391f78c44924a9cd5aee02431825da2ecfb51d3 (patch) | |
tree | 537fd4bf6d1cb13862696a08e018a45bc0f80a70 | |
parent | 6142f5996021eb7199f520bdeb5243321edd65f9 (diff) | |
download | dokka-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.kt | 9 |
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) ) |