diff options
author | Vadim Mishenev <vad-mishenev@yandex.ru> | 2023-01-23 19:03:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-23 19:03:09 +0200 |
commit | adfeed1b35b94ced80aba4e13dc926b2c389efb1 (patch) | |
tree | 61eb9c93ddc96d155c53f0385d7849b010b3911f /plugins/base/src/main/kotlin/DokkaBase.kt | |
parent | b6aa42c4a8b589f9004c70e98b3f75889297408e (diff) | |
download | dokka-adfeed1b35b94ced80aba4e13dc926b2c389efb1.tar.gz dokka-adfeed1b35b94ced80aba4e13dc926b2c389efb1.tar.bz2 dokka-adfeed1b35b94ced80aba4e13dc926b2c389efb1.zip |
Dispose `AnalysisEnvironment` (#2755)
Diffstat (limited to 'plugins/base/src/main/kotlin/DokkaBase.kt')
-rw-r--r-- | plugins/base/src/main/kotlin/DokkaBase.kt | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/DokkaBase.kt b/plugins/base/src/main/kotlin/DokkaBase.kt index ddc06fe0..456a587b 100644 --- a/plugins/base/src/main/kotlin/DokkaBase.kt +++ b/plugins/base/src/main/kotlin/DokkaBase.kt @@ -4,6 +4,7 @@ package org.jetbrains.dokka.base import org.jetbrains.dokka.CoreExtensions import org.jetbrains.dokka.analysis.KotlinAnalysis +import org.jetbrains.dokka.analysis.ProjectKotlinAnalysis import org.jetbrains.dokka.base.renderers.* import org.jetbrains.dokka.base.renderers.html.* import org.jetbrains.dokka.base.renderers.html.command.consumers.PathToRootConsumer @@ -36,6 +37,8 @@ import org.jetbrains.dokka.base.translators.descriptors.ExternalClasslikesTransl import org.jetbrains.dokka.base.translators.descriptors.ExternalDocumentablesProvider import org.jetbrains.dokka.base.utils.NoopIntellijLoggerFactory import org.jetbrains.dokka.plugability.DokkaPlugin +import org.jetbrains.dokka.plugability.querySingle +import org.jetbrains.dokka.renderers.PostAction import org.jetbrains.dokka.transformers.documentation.PreMergeDocumentableTransformer import org.jetbrains.dokka.transformers.pages.PageTransformer @@ -189,7 +192,7 @@ class DokkaBase : DokkaPlugin() { val defaultKotlinAnalysis by extending { kotlinAnalysis providing { ctx -> - KotlinAnalysis( + ProjectKotlinAnalysis( sourceSets = ctx.configuration.sourceSets, logger = ctx.logger ) @@ -281,6 +284,10 @@ class DokkaBase : DokkaPlugin() { externalClasslikesTranslator providing ::DefaultDescriptorToDocumentableTranslator } + internal val disposeKotlinAnalysisPostAction by extending { + CoreExtensions.postActions with PostAction { this@DokkaBase.querySingle { kotlinAnalysis }.close() } + } + private companion object { init { // Suppress messages emitted by the IntelliJ logger since |