aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/DokkaBase.kt
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-06-24 09:14:37 +0200
committerPaweł Marks <pmarks@virtuslab.com>2020-06-25 19:50:22 +0200
commit08f40e2a13006882e8f8425f111b8527e7bbcb0f (patch)
tree1052c35c75fccaa044a73b33e5f0b5adae4c0f57 /plugins/base/src/main/kotlin/DokkaBase.kt
parentcf2e842da89f0effa6bdb5eb942b250c94360b5c (diff)
downloaddokka-08f40e2a13006882e8f8425f111b8527e7bbcb0f.tar.gz
dokka-08f40e2a13006882e8f8425f111b8527e7bbcb0f.tar.bz2
dokka-08f40e2a13006882e8f8425f111b8527e7bbcb0f.zip
Remove kotlin source analysis from :core to :kotlin-analysis (thanks to Afzal Najam)
Diffstat (limited to 'plugins/base/src/main/kotlin/DokkaBase.kt')
-rw-r--r--plugins/base/src/main/kotlin/DokkaBase.kt21
1 files changed, 18 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/DokkaBase.kt b/plugins/base/src/main/kotlin/DokkaBase.kt
index cf4ad88f..f1b0d969 100644
--- a/plugins/base/src/main/kotlin/DokkaBase.kt
+++ b/plugins/base/src/main/kotlin/DokkaBase.kt
@@ -1,6 +1,9 @@
+@file:Suppress("unused")
+
package org.jetbrains.dokka.base
import org.jetbrains.dokka.CoreExtensions
+import org.jetbrains.dokka.analysis.KotlinAnalysis
import org.jetbrains.dokka.base.allModulePage.MultimodulePageCreator
import org.jetbrains.dokka.base.renderers.*
import org.jetbrains.dokka.base.renderers.html.*
@@ -37,13 +40,19 @@ class DokkaBase : DokkaPlugin() {
val externalLocationProviderFactory by extensionPoint<ExternalLocationProviderFactory>()
val outputWriter by extensionPoint<OutputWriter>()
val htmlPreprocessors by extensionPoint<PageTransformer>()
+ val kotlinAnalysis by extensionPoint<KotlinAnalysis>()
+
val descriptorToDocumentableTranslator by extending {
- CoreExtensions.sourceToDocumentableTranslator with DefaultDescriptorToDocumentableTranslator
+ CoreExtensions.sourceToDocumentableTranslator providing { ctx ->
+ DefaultDescriptorToDocumentableTranslator(ctx.single(kotlinAnalysis))
+ }
}
val psiToDocumentableTranslator by extending {
- CoreExtensions.sourceToDocumentableTranslator with DefaultPsiToDocumentableTranslator
+ CoreExtensions.sourceToDocumentableTranslator providing { ctx ->
+ DefaultPsiToDocumentableTranslator(ctx.single(kotlinAnalysis))
+ }
}
val documentableMerger by extending(isFallback = true) {
@@ -69,7 +78,9 @@ class DokkaBase : DokkaPlugin() {
}
val modulesAndPackagesDocumentation by extending(isFallback = true) {
- CoreExtensions.preMergeDocumentableTransformer providing ::ModuleAndPackageDocumentationTransformer
+ CoreExtensions.preMergeDocumentableTransformer providing { ctx ->
+ ModuleAndPackageDocumentationTransformer(ctx, ctx.single(kotlinAnalysis))
+ }
}
val kotlinSignatureProvider by extending(isFallback = true) {
@@ -124,6 +135,10 @@ class DokkaBase : DokkaPlugin() {
CoreExtensions.renderer providing ::HtmlRenderer applyIf { format == "html" }
}
+ val defaultKotlinAnalysis by extending(isFallback = true) {
+ kotlinAnalysis providing { ctx -> KotlinAnalysis(ctx) }
+ }
+
val locationProvider by extending(isFallback = true) {
locationProviderFactory providing ::DefaultLocationProviderFactory
}