Dokkatoo is a Gradle plugin that generates easy-to-use reference documentation for your Kotlin (or Java!) projects.
- Automatic documentation - Automatically generates up-to-date docs from your code, for both Kotlin and Java projects.
- Format Flexibility - Supports generating HTML, Javadoc, and Markdown output formats.
- Customization King - Make your documentation truly yours. With Dokkatoo, you can customize the output, including custom stylesheets and assets.
- Gradle's Best Friend - Compatible with all of Gradle's most powerful features! Incremental compilation, multimodule builds, composite builds, Build Cache, Configuration Cache.
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:
- Compatible with Gradle Build Cache.
- Compatible with Gradle Configuration Cache.
- Follows Gradle best practices for plugin development, for a more stable experience.
- Faster, parallel execution.
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.