Why is org.jetbrains.dokka.gradle.DokkaPlugin#setupDokkaTasks private?
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
- Operating system: Linux
- Build tool: Gradle 8.8
- Dokka version: 1.9.20
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.
DGPv2 is now released, and has a new, easier method of creating custom format Dokka Gradle plugins. Accessing the private setupDokkaTasks() function is no longer necessary.
For an example of how to create a custom Dokka plugin, see https://github.com/Kotlin/dokka/tree/4c903d0596e1cd97daf943b2ee11d5b55a9a11ec/examples/gradle-v2/custom-dokka-plugin-example
Dokka plugin development still needs some work. Follow these issues to track their progress.
- https://github.com/Kotlin/dokka/issues/3869
- https://github.com/Kotlin/dokka/issues/3925