From 02f30b142aa467d3a24cc52a1fe3f2fed7ea1e33 Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Thu, 31 Aug 2023 20:16:01 +0200 Subject: Enable explicit API mode (#3139) --- .../gfm/templateProcessing/GfmTemplateProcessingPlugin.kt | 13 +++++++------ .../gfm/templateProcessing/GfmTemplateProcessingStrategy.kt | 4 +++- 2 files changed, 10 insertions(+), 7 deletions(-) (limited to 'plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains') diff --git a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt b/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt index 4bb9cf63..fd2af274 100644 --- a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt +++ b/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingPlugin.kt @@ -7,33 +7,34 @@ package org.jetbrains.dokka.gfm.templateProcessing import org.jetbrains.dokka.allModulesPage.AllModulesPagePlugin import org.jetbrains.dokka.allModulesPage.MultimoduleLocationProvider import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.resolvers.local.LocationProviderFactory import org.jetbrains.dokka.gfm.GfmPlugin import org.jetbrains.dokka.gfm.location.MarkdownLocationProvider import org.jetbrains.dokka.plugability.DokkaPlugin import org.jetbrains.dokka.plugability.DokkaPluginApiPreview +import org.jetbrains.dokka.plugability.Extension import org.jetbrains.dokka.plugability.PluginApiPreviewAcknowledgement +import org.jetbrains.dokka.templates.TemplateProcessingStrategy import org.jetbrains.dokka.templates.TemplatingPlugin -class GfmTemplateProcessingPlugin : DokkaPlugin() { +public class GfmTemplateProcessingPlugin : DokkaPlugin() { private val allModulesPagePlugin by lazy { plugin() } private val templateProcessingPlugin by lazy { plugin() } - private val gfmPlugin by lazy { plugin() } - private val dokkaBase by lazy { plugin()} - val gfmTemplateProcessingStrategy by extending { + public val gfmTemplateProcessingStrategy: Extension by extending { (templateProcessingPlugin.templateProcessingStrategy providing ::GfmTemplateProcessingStrategy order { before(templateProcessingPlugin.fallbackProcessingStrategy) }) } - val gfmLocationProvider by extending { + public val gfmLocationProvider: Extension by extending { dokkaBase.locationProviderFactory providing MultimoduleLocationProvider::Factory override listOf(gfmPlugin.locationProvider, allModulesPagePlugin.multimoduleLocationProvider) } - val gfmPartialLocationProvider by extending { + public val gfmPartialLocationProvider: Extension by extending { allModulesPagePlugin.partialLocationProviderFactory providing MarkdownLocationProvider::Factory override allModulesPagePlugin.baseLocationProviderFactory } diff --git a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt b/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt index 306412e3..8f23e8e9 100644 --- a/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt +++ b/plugins/gfm/gfm-template-processing/src/main/kotlin/org/jetbrains/dokka/gfm/templateProcessing/GfmTemplateProcessingStrategy.kt @@ -20,7 +20,9 @@ import org.jetbrains.dokka.templates.TemplateProcessingStrategy import java.io.BufferedWriter import java.io.File -class GfmTemplateProcessingStrategy(val context: DokkaContext) : TemplateProcessingStrategy { +public class GfmTemplateProcessingStrategy( + public val context: DokkaContext +) : TemplateProcessingStrategy { private val externalModuleLinkResolver = context.plugin().querySingle { externalModuleLinkResolver } -- cgit