Get started with Dokka

Last modified: 27 March 2025

Below you can find simple instructions to help you get started with Dokka.

Apply the Gradle plugin for Dokka in the root build script of your project:

plugins {
    id("org.jetbrains.dokka") version "2.0.0"
}

When documenting multi-project builds, you need to apply the Gradle plugin within subprojects as well:

subprojects {
    apply(plugin = "org.jetbrains.dokka")
}

To generate documentation, run the following Gradle tasks:

  • dokkaHtml for single-project builds

  • dokkaHtmlMultiModule for multi-project builds

By default, the output directory is set to /build/dokka/html and /build/dokka/htmlMultiModule.

To learn more about using Dokka with Gradle, see Gradle.