dokkatoo

dokkatoo

Generates documentation for Kotlin Gradle projects (based on Dokka)

Dokkatoo Logo

Dokkatoo is a Gradle plugin that generates easy-to-use reference documentation for your Kotlin (or Java!) projects.

For the full documentation, click here

What can Dokkatoo do?

  • 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.

Showcase

For real-life examples of the documentation that Dokkatoo generates, check out the showcase!

Getting Started

View the documentation for more detailed instructions about how to set up and use Dokkatoo.

Quick start

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.

  1. Check the Gradle Plugin Portal to find the latest version of Dokkatoo.

  2. Add the Dokkatoo plugin to your subproject:

    // build.gradle.kts
    
    plugins {
      kotlin("jvm")
      id("dev.adamko.dokkatoo-html")
    }
    
  3. (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"))
    }
    
  4. Run the generation task:

    ./gradlew :dokkatooGenerate
    
  5. 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.

Releases

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

Why not Dokka?

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 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.