/* * Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. */ package org.jetbrains.dokka.templates import org.jetbrains.dokka.allModulesPage.templates.PackageListProcessingStrategy import org.jetbrains.dokka.allModulesPage.templates.PagesSearchTemplateStrategy import org.jetbrains.dokka.plugability.* import templates.ProjectNameSubstitutor import templates.ReplaceVersionCommandHandler import templates.SourcesetDependencyProcessingStrategy @Suppress("unused") public class TemplatingPlugin : DokkaPlugin() { public val submoduleTemplateProcessor: ExtensionPoint by extensionPoint() public val multimoduleTemplateProcessor: ExtensionPoint by extensionPoint() public val templateProcessingStrategy: ExtensionPoint by extensionPoint() public val directiveBasedCommandHandlers: ExtensionPoint by extensionPoint() public val substitutor: ExtensionPoint by extensionPoint() public val defaultSubmoduleTemplateProcessor: Extension by extending { submoduleTemplateProcessor providing ::DefaultSubmoduleTemplateProcessor } public val defaultMultiModuleTemplateProcessor: Extension by extending { multimoduleTemplateProcessor providing ::DefaultMultiModuleTemplateProcessor } public val directiveBasedHtmlTemplateProcessingStrategy: Extension by extending { templateProcessingStrategy providing ::DirectiveBasedHtmlTemplateProcessingStrategy order { before(fallbackProcessingStrategy) } } public val sourcesetDependencyProcessingStrategy: Extension by extending { templateProcessingStrategy providing ::SourcesetDependencyProcessingStrategy order { before(fallbackProcessingStrategy) } } public val pagesSearchTemplateStrategy: Extension by extending { templateProcessingStrategy providing ::PagesSearchTemplateStrategy order { before(fallbackProcessingStrategy) } } public val packageListProcessingStrategy: Extension by extending { templateProcessingStrategy providing ::PackageListProcessingStrategy order { before(fallbackProcessingStrategy) } } public val fallbackProcessingStrategy: Extension by extending { templateProcessingStrategy with FallbackTemplateProcessingStrategy() } public val pathToRootSubstitutor: Extension by extending { substitutor providing ::PathToRootSubstitutor } public val projectNameSubstitutor: Extension by extending { substitutor providing ::ProjectNameSubstitutor } public val addToNavigationCommandHandler: Extension by extending { directiveBasedCommandHandlers providing ::AddToNavigationCommandHandler } public val substitutionCommandHandler: Extension by extending { directiveBasedCommandHandlers providing ::SubstitutionCommandHandler } public val replaceVersionCommandHandler: Extension by extending { directiveBasedCommandHandlers providing ::ReplaceVersionCommandHandler } @OptIn(DokkaPluginApiPreview::class) override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement = PluginApiPreviewAcknowledgement }