Search code examples
kotlinkotlin-dokka

Readily available examples of documentation built with Dokka?


The official documentation on Dokka says that Dokka can output result in different formats:

Output formats

  • html - minimalistic html format used by default, Java classes are translated to Kotlin
  • javadoc - looks like normal Javadoc, Kotlin classes are translated to Java
  • html-as-java - looks like html, but Kotlin classes are translated to Java
  • markdown - markdown structured as html, Java classes are translated to Kotlin
    • gfm - GitHub flavored markdown
    • jekyll - Jekyll compatible markdown
  • kotlin-website* - internal format used for documentation on kotlinlang.org

While I've seen some of the formats on kotlinlang.org (the Standard Library and the Language Guide) I have yet to see others.

Are there any links to documentation generated in html, javadoc, or html-as-java formats?


Solution

  • Sure, for html please see https://gradle.github.io/kotlin-dsl-docs/api/, javadoc uses HtmlDoclet from your JDK (it currently does not work with JDK > 8), so it is just ordinary javadoc and html-as-java looks like html, the only difference is that Kotlin types are translated to Java (so you get Foo extends Bar instead of Foo : Bar). Also please note we're working on a new version of dokka with all the formats rewritten and prettier