Skip to main content

Getting Started

So, you have a Kotlin or Java project that uses Gradle and you want to generate some pretty API reference documentation. You've come to the right place.

Find the latest version of Dokkatoo

Find the latest version of Dokkatoo:

Choose a format

Dokkatoo is very flexible, and can generate documentation in multiple formats. For examples of the sites Dokkatoo can generate, check out the Showcase.

tip

If you're unsure about which format to choose, I recommend using the HTML plugin. It has the best support and the most features, and you can always add another format later!

For more detailed information see the Dokka documentation.

The HTML plugin provides tasks that can generate any of the other formats.

build.gradle.kts
plugins {
id("dev.adamko.dokkatoo-html") version "$dokkatooVersion"
}

Apply Dokkatoo to your project

Now let's see how to apply Dokkatoo to a Gradle project.

Apply the appropriate plugin for any formats you'd like to generate.

For example, HTML and Javadoc:

build.gradle.kts
plugins {
id("dev.adamko.dokkatoo") version "$dokkatooVersion"
}

Run the generation task

./gradlew :dokkatooGenerate

View the results in the ./build/dokka/ directory.

info

Only run the dokkatooGenerate task in the aggregating project by prefixing the task name with the subproject path, e.g. :my-subproject:dokkatooGenerate.

If the root project is aggregating, prefix the task with a single :.