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

89 questions
32
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
  • 140,743
  • 39
  • 371
  • 326
28
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
  • 289
  • 1
  • 3
  • 5
15
votes
1 answer

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
  • 163
  • 1
  • 5
13
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,521
  • 11
  • 20
12
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,916
  • 1
  • 21
  • 26
10
votes
2 answers

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
  • 43,673
  • 4
  • 57
  • 93
9
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
  • 13,181
  • 30
  • 111
  • 179
8
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
  • 259
  • 1
  • 5
  • 15
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
  • 604
  • 11
  • 27
8
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
  • 91
  • 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
  • 9,247
  • 5
  • 29
  • 44
6
votes
0 answers

Problem with dokka CLI - "Exiting Generation: Nothing to document"

I'm trying to generate documentation for my kotlin code. Some of my classes and functions have KDOC comments. I tried to run dokka from the CLI like this: java -jar dokka-cli-1.4.20.jar And the result was: WARN: Dokka 1.4.* is an alpha project…
MyName
  • 2,136
  • 5
  • 26
  • 37
6
votes
1 answer

Reference value of constant with KDoc

I have a object like the following in my project object UrlUtils { private const val PARAM = "whatever" /** * Method that appends the [PARAM] parameter to the url */ fun appendParameter(url: String) { // ... …
user3420815
  • 775
  • 9
  • 20
6
votes
2 answers

How to escape symbols in Kotlin documentation Dokka/Kdoc?

I want to add a comment like this /** * @param scrollFraction In range [0..1]. */ But Dokka/Kdoc interprets stuff inside square brackets as a reference. This leads to badly rendered comments when you check the function's documentation in…
Dmitry Ryadnenko
  • 22,222
  • 4
  • 42
  • 56
6
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,872
  • 4
  • 20
  • 37
1
2 3 4 5 6