Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.44k stars 410 forks source link

Why is org.jetbrains.dokka.gradle.DokkaPlugin#setupDokkaTasks private? #3721

Open CLOVIS-AI opened 3 months ago

CLOVIS-AI commented 3 months ago

I'd like to create a new output format for Material for MkDocs, which is inspired by the GFM format. I need to create Gradle tasks for this new format.

Looking at the Gradle plugin code, it seems that the following code would do everything I need:

project.setupDokkaTasks("dokkaMkDocs") {
    plugins.dependencies.add("my plugin…")
    description = "Generates documentation in 'Material for MkDocs' format"
}

However, setupDokkaTasks is private.

Question Why is setupDokkaTasks private? Could it be made public?

Installation

adam-enko commented 2 months ago

Hi, thanks for reporting this 👋

In Dokka Gradle Plugin v2 we have planned to make it easier to create new format plugins. However, the functionality will still be experimental in the 2.0.0 release.

The plan is for formats to create a subclass of DokkaFormatPlugin.