Dokka

API documentation engine for Kotlin
Alternatives To Dokka
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Sdwebimage24,609
12,5462 days ago116July 23, 202250mitObjective-C
Asynchronous image downloader with cache support as a UIImageView category
Typescript Eslint13,44664,39976,5032 hours ago1,852September 23, 2022441otherTypeScript
:sparkles: Monorepo for all the tooling which enables ESLint to support TypeScript
Google Java Format4,9497791a month ago17March 07, 2022107otherJava
Reformats Java source code to comply with Google Java Style.
Unified3,80556,2401,26020 days ago51March 08, 20224mitJavaScript
☔️ interface for parsing, inspecting, transforming, and serializing content through syntax trees
Dokka2,95344 hours ago13June 19, 2022387apache-2.0Kotlin
API documentation engine for Kotlin
Clangformat Xcode2,790
3 years agoSeptember 26, 202232mitObjective-C
Xcode plug-in to to use clang-format from in Xcode and consistently format your code with Clang
Steal1,359699389a year ago328June 09, 202284mitJavaScript
Gets JavaScript
Minecraftdev1,191
14 days ago219lgpl-3.0Kotlin
Plugin for IntelliJ IDEA that gives special support for Minecraft modding projects.
Moment Duration Format8421,9803733 years ago15June 05, 201930mitJavaScript
Format function plugin for the Moment Duration object.
Prettier Standard8199331,2392 years ago65July 08, 202016mitJavaScript
Formats with Prettier and lints with ESLint+Standard! (✿◠‿◠)
Alternatives To Dokka
Select To Compare


Alternative Project Comparisons
Readme

Dokka

Kotlin Beta JetBrains official project Maven Central Gradle Plugin License

Dokka is an API documentation engine for Kotlin.

Just like Kotlin itself, Dokka supports mixed-language projects. It understands Kotlin's KDoc comments and Java's Javadoc comments.

Dokka can generate documentation in multiple formats, including its own modern HTML format, multiple flavors of Markdown, and Java's Javadoc HTML.

Some libraries that use Dokka for their API reference documentation:

You can run Dokka using Gradle, Maven or from the command line. It is also highly pluggable.

Documentation

Comprehensive documentation for Dokka is available on kotlinlang.org

Get started with Dokka

Gradle

Kotlin DSL

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

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

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

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

Apply Gradle plugin for Dokka in the root project:

plugins {
    id 'org.jetbrains.dokka' version '1.8.20'
}

When documenting multi-project builds, you need to apply the Gradle plugin for Dokka 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 respectively.

To learn more about the Gradle plugin for Dokka, see documentation for Gradle.

Maven

Add the Dokka Maven plugin to the plugins section of your POM file:

<build>
    <plugins>
        <plugin>
            <groupId>org.jetbrains.dokka</groupId>
            <artifactId>dokka-maven-plugin</artifactId>
            <version>1.8.20</version>
            <executions>
                <execution>
                    <phase>pre-site</phase>
                    <goals>
                        <goal>dokka</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

To generate documentation, run the dokka:dokka goal.

By default, the output directory is set to target/dokka.

To learn more about using Dokka with Maven, see documentation for Maven.

CLI

It is possible to run Dokka from the command line without having to use any of the build tools, but it's more difficult to set up and for that reason it is not covered in this section.

Please consult documentation for the command line runner to learn how to use it.

Android

In addition to applying and configuring Dokka, you can apply Dokka's Android documentation plugin, which aims to improve documentation experience on the Android platform:

Gradle Kotlin DSL
dependencies {
    dokkaPlugin("org.jetbrains.dokka:android-documentation-plugin:1.8.20")
}
Gradle Groovy DSL
dependencies {
    dokkaPlugin 'org.jetbrains.dokka:android-documentation-plugin:1.8.20'
}
Maven
<plugin>
    <groupId>org.jetbrains.dokka</groupId>
    <artifactId>dokka-maven-plugin</artifactId>
    ...
    <configuration>
        <dokkaPlugins>
            <plugin>
                <groupId>org.jetbrains.dokka</groupId>
                <artifactId>android-documentation-plugin</artifactId>
                <version>1.8.20</version>
            </plugin>
        </dokkaPlugins>
    </configuration>
</plugin>

Output formats

HTML

HTML is Dokka's default and recommended output format. You can see an example of the output by browsing documentation for kotlinx.coroutines.

HTML format is configurable and, among other things, allows you to modify stylesheets, add custom image assets, change footer message and revamp the structure of the generated HTML pages through templates.

For more details and examples, see documentation for HTML format.

Markdown

Dokka is able to generate documentation in GitHub Flavored and Jekyll compatible Markdown. However, both of these formats are still in Alpha, so you might encounter bugs and migration issues.

For more details and examples, see documentation for Markdown formats.

Javadoc

Dokka's Javadoc output format is a lookalike of Java's Javadoc HTML format. This format is still in Alpha, so you might encounter bugs and migration issues.

Javadoc format tries to visually mimic HTML pages generated by the Javadoc tool, but it's not a direct implementation or an exact copy. In addition, all Kotlin signatures are translated to Java signatures.

For more details and examples, see documentation for Javadoc format.

Dokka plugins

Dokka was built from the ground up to be easily extensible and highly customizable, which allows the community to implement plugins for missing or very specific features that are not provided out of the box.

Learn more about Dokka plugins and their configuration in Dokka plugins.

If you want to learn how to develop Dokka plugins, see Developer guides.

Community

Dokka has a dedicated #dokka channel in Kotlin Community Slack where you can chat about Dokka, its plugins and how to develop them, as well as get in touch with maintainers.

Building and Contributing

See Contributing Guidelines

Popular Plugin Projects
Popular Format Projects
Popular Libraries Categories
Related Searches

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.
Java
Plugin
Kotlin
Format
Gradle