Questions tagged [kotlin-dokka]

Dokka is a documentation generation engine for the Kotlin language, handling both JavaDoc and KDoc style documentation comments.

Dokka is a documentation generation engine for the Kotlin language, handling both JavaDoc and KDoc style documentation comments. It has plugins available for Maven and Gradle and the project is open-source.

See: Dokka project page

70 questions
21
votes
1 answer

How do I inherit KDoc documentation?

In Java's Javadoc, there is a way to inherit a method's documentation in a subclass using {@inheritDoc} tag. Is there a way to do the same in Kotlin's KDoc? Basically, what I'd like to do is the following: abstract class Base { /** * Some…
hotkey
  • 111,884
  • 27
  • 298
  • 285
13
votes
0 answers

error: incompatible types: NonExistentClass cannot be converted to Annotation @error.NonExistentClass()

I am trying to generate Doka docs of my project. While generating I am getting an error like above. I have searched so many but could not able to get solution to this. I have gone through this link also. Here it is saying it might be a dagger…
Divya
  • 139
  • 1
  • 5
9
votes
1 answer

How to document a primary constructor parameter with Kotlin Dokka

Let's say there's a class which primary constructor has the parameter param that I'd like to be resolved (linked to the actual parameter) within the doc block of the class. /** Class A does something using [param]. @constructor constructs A with…
Markus Marvell
  • 1,756
  • 1
  • 17
  • 25
9
votes
1 answer

Where/How do You Add Documentation for Kotlin Packages?

In Java, if you want to document a package, it has to be put into the package-info.class file. Is that still the same thing with Kotlin and KDoc? I've looked through some of the Kotlin source and can't find where their package documentation is…
Jacob Zimmerman
  • 1,254
  • 8
  • 18
8
votes
2 answers

Dokka - skip generating javadoc for default android packages

I am trying to use Dokka plugin to generate Javadoc for android Kotlin application. I added the plugin to my gradle: classpath "org.jetbrains.dokka:dokka-gradle-plugin:0.9.15" Then I made a basic configuration following project instructions: dokka…
ikurek
  • 534
  • 5
  • 19
8
votes
1 answer

Copy KDoc docs from one method to another

For the two given methods: /** * Adds a [DataItem] to the Android Wear network. The updated item is synchronized across all devices. */ fun putItem(){ .... } /** * "same KDOC here with above" */ fun putItem(putRequest: PutDataRequest){ .... } Is…
Diolor
  • 12,142
  • 23
  • 103
  • 165
7
votes
1 answer

Dokka: include code samples into package documentation

How do I include (tested, non-stale) code samples into Dokka package documentation? More specifically, assuming that I have this configuration in my build.gradle.kts: withType { outputFormat = "html" outputDirectory =…
Andrey Tyukin
  • 38,712
  • 4
  • 38
  • 75
7
votes
5 answers

Dokka plugin not found in Android studio 3

I'm trying to use the dokka plugin in my Kotlin project, but I'm getting the following message: Error:(7, 0) Plugin with id 'org.jetbrains.dokka' not found. I'm using Android Studio version 3.0. Thanks in advance.
Melchior
  • 219
  • 5
  • 14
7
votes
4 answers

Can't get dokka to generate kotlin docs on gradle/android project

I'm following the gradle plugin section in https://github.com/Kotlin/dokka . I also tried the dokka-gradle-example example in https://github.com/JetBrains/kotlin-examples/tree/master/gradle/dokka-gradle-example . The versions I'm using are: android:…
Tiago Reul
  • 81
  • 1
  • 4
7
votes
1 answer

Kotlin KDoc: Documentation?

I have seen here, here and there references to KDoc, the JavaDoc utility equivalent for Kotlin. However, I cannot find any documentation on how to use it, let alone how to customize it or integrate it in Maven or Gradle. I know the Kotlin API doc is…
Salomon BRYS
  • 7,929
  • 5
  • 23
  • 39
6
votes
0 answers

Is there a convention for documenting Lambdas as a function parameter in KDoc?

I'm writing a Kotlin function which takes a lambda as a parameter, like fun someFunction( param1: (value1: Boolean, value2: Boolean) -> Unit ) I'm wondering if there's a way to document the function as input, so I can reference value1 or value2 in…
Michael Liu
  • 61
  • 1
  • 3
5
votes
1 answer

How can I add a footer to Kotlin Dokka docs?

I am looking for a way to include text in the footer of all Dokka generated docs. I am not seeing this option being advertised by the Gradle or Maven plugins for Dokka. Is this possible? Can you point me to a sample?
Antoine Toulme
  • 840
  • 4
  • 15
5
votes
0 answers

Kotlin Dokka - Error loading Package List

I'm trying to generate a documentation from my Kotlin project using Dokka. I'm using the 0.9.17 version. Here is my gradle configuration : dokka { includes = ['../README.md'] outputFormat = 'html' outputDirectory =…
Bruno
  • 3,204
  • 4
  • 14
  • 30
4
votes
2 answers

How do I make a nested list in Dokka?

Trying to document some Kotlin code with a pretty routine structure: A numbered list. With a bulleted sublist. Where the numbers continue correctly at the top level of the list. What I take to be the official Dokka page doesn't even have the…
0xbe5077ed
  • 4,217
  • 1
  • 28
  • 62
4
votes
1 answer

How to have Dokka generate a deployable github wiki?

As part of building my project, I am looking to have Dokka's maven plugin build a markdown wiki that I can deploy to github without modification. I have no problem building the markdown, and viewing the documentation through intellij, but I am…
1
2 3 4 5