whatisgithub

What is dokka?

kotlin/dokka — explained in plain English

Analysis updated 2026-06-26

3,772KotlinAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

The official documentation generator for Kotlin maintained by JetBrains. It reads comment blocks in Kotlin and Java source code and produces polished API reference pages in HTML or Markdown format.

Mindmap

mindmap
  root((Dokka))
    What it does
      Generates API docs
      Reads KDoc Javadoc
      Outputs HTML Markdown
    Integration
      Gradle plugin
      Maven plugin
      CLI runner
    Output formats
      HTML default
      GitHub Markdown
      Javadoc HTML
    Audience
      Kotlin developers
      Java developers
      Android teams
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Generate an HTML API reference site from KDoc comments in a Kotlin library using the Dokka Gradle plugin.

USE CASE 2

Produce Markdown documentation from a Kotlin project that can be published directly in a GitHub Pages site.

USE CASE 3

Generate combined API docs for a mixed Kotlin and Java project without any special configuration.

USE CASE 4

Extend Dokka with a custom plugin to add a new output format or preprocessing step for your documentation pipeline.

What is it built with?

KotlinJavaGradleMaven

How does it compare?

kotlin/dokkarumboalla/apkupdaterhdshare/wauxiliary_public
Stars3,7723,7903,752
LanguageKotlinKotlinKotlin
Setup difficultymoderateeasyhard
Complexity3/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a Gradle or Maven project, adding a few lines to the build script is all that is needed to get started.

Open-source under the Apache 2.0 license, use freely in personal or commercial projects.

So what is it?

Dokka is the official documentation generator for Kotlin, built and maintained by JetBrains, the company behind the Kotlin language. It reads the comment blocks that developers write inside their Kotlin or Java source code and turns them into polished API reference pages. If you have ever browsed the online documentation for a Kotlin library and seen an organized list of classes, functions, and their descriptions, there is a good chance Dokka produced it. The tool understands two comment styles: KDoc, which is Kotlin's own documentation format, and Javadoc, the format used in Java code. This means projects that mix both languages, a common setup in Android development, work without any special configuration. Dokka can output documentation in several formats: its own HTML format (the default and most fully featured), Markdown in GitHub Flavored or Jekyll style, and a Javadoc-compatible HTML format that mirrors what the Java ecosystem expects. The Markdown and Javadoc output modes are currently marked as Alpha and may have rough edges. You add Dokka to a project by installing it as a Gradle or Maven plugin. For Gradle projects, a few lines in the build script are enough to get started, and running a single task produces the HTML output in a build folder. Maven users add a plugin entry to their POM file and run a goal. A command-line runner also exists for situations where neither build tool is in play, though its setup is more involved. Dokka also ships a dedicated Android plugin that adjusts the documentation experience for Android-specific APIs. Several well-known Kotlin and Java projects use Dokka for their public documentation, including Ktor, OkHttp, and the Gradle Kotlin DSL docs. The tool is built to be extended: a plugin system lets teams add custom output formats, preprocessing steps, or other behaviors beyond what ships out of the box.

Copy-paste prompts

Prompt 1
How do I add the Dokka Gradle plugin to my Kotlin project and run the task that generates the HTML documentation output?
Prompt 2
I have a Kotlin library with KDoc comments. How do I configure Dokka to produce a GitHub-flavored Markdown output instead of HTML?
Prompt 3
What is the difference between the HTML, GFM, Jekyll, and Javadoc output formats in Dokka, and when should I use each one?
Prompt 4
How do I configure Dokka to generate documentation for a multi-module Gradle project and combine it into one unified reference site?
Prompt 5
I am building an Android library. How do I use the Dokka Android plugin to generate documentation that handles Android-specific APIs correctly?

Frequently asked questions

What is dokka?

The official documentation generator for Kotlin maintained by JetBrains. It reads comment blocks in Kotlin and Java source code and produces polished API reference pages in HTML or Markdown format.

What language is dokka written in?

Mainly Kotlin. The stack also includes Kotlin, Java, Gradle.

What license does dokka use?

Open-source under the Apache 2.0 license, use freely in personal or commercial projects.

How hard is dokka to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is dokka for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.