aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/CoreExtensions.kt4
-rw-r--r--core/src/main/kotlin/DokkaGenerator.kt13
-rw-r--r--core/src/main/kotlin/plugability/DefaultExtensions.kt5
3 files changed, 6 insertions, 16 deletions
diff --git a/core/src/main/kotlin/CoreExtensions.kt b/core/src/main/kotlin/CoreExtensions.kt
index f56cd854..87509dc4 100644
--- a/core/src/main/kotlin/CoreExtensions.kt
+++ b/core/src/main/kotlin/CoreExtensions.kt
@@ -26,8 +26,8 @@ object CoreExtensions {
val markdownToContentConverterFactory by coreExtension<(DokkaContext) -> MarkdownToContentConverter>()
val documentationToPageTranslator by coreExtension<DocumentationToPageTranslator>()
val pageTransformer by coreExtension<PageNodeTransformer>()
- val renderer by coreExtension<(FileWriter, LocationProvider, DokkaContext) -> Renderer>()
- val locationProvider by coreExtension<(root: PageNode, DokkaConfiguration, DokkaContext) -> LocationProvider>()
+ val rendererFactory by coreExtension<(FileWriter, LocationProvider, DokkaContext) -> Renderer>()
+ val locationProviderFactory by coreExtension<(root: PageNode, DokkaConfiguration, DokkaContext) -> LocationProvider>()
val fileExtension by coreExtension<String>()
private fun <T: Any> coreExtension() = object {
diff --git a/core/src/main/kotlin/DokkaGenerator.kt b/core/src/main/kotlin/DokkaGenerator.kt
index b6bf7a73..2efcca5a 100644
--- a/core/src/main/kotlin/DokkaGenerator.kt
+++ b/core/src/main/kotlin/DokkaGenerator.kt
@@ -1,19 +1,10 @@
package org.jetbrains.dokka
import org.jetbrains.dokka.Model.Module
-import org.jetbrains.dokka.Utilities.pretty
-import org.jetbrains.dokka.links.DRI
-import org.jetbrains.dokka.pages.DefaultMarkdownToContentConverter
import org.jetbrains.dokka.pages.PlatformData
import org.jetbrains.dokka.plugability.DokkaContext
import org.jetbrains.dokka.plugability.single
import org.jetbrains.dokka.renderers.FileWriter
-import org.jetbrains.dokka.renderers.HtmlRenderer
-import org.jetbrains.dokka.resolvers.DefaultLocationProvider
-import org.jetbrains.dokka.resolvers.LocationProvider
-import org.jetbrains.dokka.transformers.documentation.DefaultDocumentationToPageTranslator
-import org.jetbrains.dokka.transformers.descriptors.DokkaDescriptorVisitor
-import org.jetbrains.dokka.transformers.documentation.DefaultDocumentationNodeMerger
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageLocation
import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
import org.jetbrains.kotlin.cli.common.messages.MessageCollector
@@ -57,9 +48,9 @@ class DokkaGenerator(
logger.debug("Rendering")
val fileWriter = FileWriter(configuration.outputDir, "")
- val locationProvider = context.single(CoreExtensions.locationProvider)
+ val locationProvider = context.single(CoreExtensions.locationProviderFactory)
.invoke(transformedPages, configuration, context)
- val renderer = context.single(CoreExtensions.renderer)
+ val renderer = context.single(CoreExtensions.rendererFactory)
.invoke(fileWriter, locationProvider, context)
renderer.render(transformedPages)
diff --git a/core/src/main/kotlin/plugability/DefaultExtensions.kt b/core/src/main/kotlin/plugability/DefaultExtensions.kt
index dd656386..d89fc031 100644
--- a/core/src/main/kotlin/plugability/DefaultExtensions.kt
+++ b/core/src/main/kotlin/plugability/DefaultExtensions.kt
@@ -2,7 +2,6 @@ package org.jetbrains.dokka.plugability
import org.jetbrains.dokka.CoreExtensions
import org.jetbrains.dokka.pages.DefaultMarkdownToContentConverter
-import org.jetbrains.dokka.renderers.DefaultRenderer
import org.jetbrains.dokka.renderers.HtmlRenderer
import org.jetbrains.dokka.resolvers.DefaultLocationProvider
import org.jetbrains.dokka.transformers.descriptors.DefaultDescriptorToDocumentationTranslator
@@ -17,8 +16,8 @@ object DefaultExtensions : DokkaExtensionHandler {
CoreExtensions.documentationMerger -> DefaultDocumentationNodeMerger
CoreExtensions.markdownToContentConverterFactory -> ::DefaultMarkdownToContentConverter
CoreExtensions.documentationToPageTranslator -> DefaultDocumentationToPageTranslator
- CoreExtensions.renderer -> ::HtmlRenderer
- CoreExtensions.locationProvider -> ::DefaultLocationProvider
+ CoreExtensions.rendererFactory -> ::HtmlRenderer
+ CoreExtensions.locationProviderFactory -> ::DefaultLocationProvider
CoreExtensions.fileExtension -> ".html"
else -> null
}.let { listOfNotNull(it) as List<T> }