Dokkatoo is a Gradle plugin that generates easy-to-use reference documentation for your Kotlin (or Java!) projects.
Under the hood Dokkatoo uses Dokka, the API documentation engine for Kotlin.
For real-life examples of the documentation that Dokkatoo generates, check out the showcase!
View the documentation for more detailed instructions about how to set up and use Dokkatoo.
To quickly generate documentation for your project, follow these steps.
[!TIP] Dokkatoo supports multiple formats, but HTML is the quickest and easiest to get started with.
Check the Gradle Plugin Portal to find the latest version of Dokkatoo.
Add the Dokkatoo plugin to your subproject:
// build.gradle.kts
plugins {
kotlin("jvm")
id("dev.adamko.dokkatoo-html")
}
(Optional) If you'd like to combine multiple subprojects, add the Dokkatoo plugin to each subproject, and aggregate them in a single project by declaring dependencies to the subprojects.
// build.gradle.kts
plugins {
id("dev.adamko.dokkatoo-html")
}
dependencies {
// Aggregate both subproject-hello and subproject-world into the current subproject.
// These subprojects must also have Dokkatoo applied.
dokkatoo(project(":subproject-hello"))
dokkatoo(project(":subproject-world"))
}
Run the generation task:
./gradlew :dokkatooGenerate
View the results in ./build/dokka/
For more detailed instructions about how to set up and use Dokkatoo, and control the output, more guides are available in the docs.
Dokkatoo is available from the Gradle Plugin Portal and Maven Central. Snapshot releases are also available.
More details about the Dokkatoo releases is available in the documentation Dokkatoo Documentation
If Dokka already has a Gradle plugin, then what is Dokkatoo for?
Dokkatoo has a number of improvements over the existing Dokka Gradle Plugin:
Migrating from Dokka to Dokkatoo can be done in a few simple steps. Check the Dokkatoo Documentation to get started.
If you'd like to see comparative examples of the same projects with both Dokka and Dokkatoo config, check the example projects.