All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.dokka.gfm.templateProcessing.GfmTemplateProcessingPlugin.kt Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
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.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.PluginApiPreviewAcknowledgement
import org.jetbrains.dokka.templates.TemplatingPlugin

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 {
        (templateProcessingPlugin.templateProcessingStrategy
                providing ::GfmTemplateProcessingStrategy
                order { before(templateProcessingPlugin.fallbackProcessingStrategy) })
    }

    val gfmLocationProvider by extending {
        dokkaBase.locationProviderFactory providing MultimoduleLocationProvider::Factory override listOf(gfmPlugin.locationProvider, allModulesPagePlugin.multimoduleLocationProvider)
    }

    val gfmPartialLocationProvider by extending {
        allModulesPagePlugin.partialLocationProviderFactory providing MarkdownLocationProvider::Factory override allModulesPagePlugin.baseLocationProviderFactory
    }

    @OptIn(DokkaPluginApiPreview::class)
    override fun pluginApiPreviewAcknowledgement(): PluginApiPreviewAcknowledgement =
        PluginApiPreviewAcknowledgement
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy