KDoc is a documentation generation system which reads specially formatted comments in Kotlin source code and generates compiled documentation. It is typically used to produce API documentation in the form of HTML web pages.
Resources
KDoc is a documentation generation system which reads specially formatted comments in Kotlin source code and generates compiled documentation. It is typically used to produce API documentation in the form of HTML web pages.
Resources
Version | Description |
---|---|
2 | *Added field…
![]()
Johan
8
votes
1 answer
Kotlin: Documentation for property setterI am writing a Kotlin library. In one of the classes, I have the following:
class SessionWrapper {
/**
* The time in milliseconds after which the session will expire.
*/
var expiryTime = DEFAULT_EXPIRY_TIME
get() {
…
![]()
cjurjiu
7
votes
2 answers
Where to put documentation for a Kotlin file (not package, not module, not class)Where should I put a comment about a Kotlin source file?
Classes and other objects have KDoc:
/**
* Summary
*
* Rest of documentation goes here.
*/
class A {
...
}
But where should I put something like this?
// This file contains constants…
![]()
Tobia
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
6
votes
1 answer
Where do I find the samples referred to by Jetpack Compose source documentation?The KDoc contains links as to some package and Kotlin file, but I can't see such packages and files actually
Documentation window screenshot
I looked through the Google Maven repository, expecting to find that I just haven't included some package in…
![]()
Vitalis11
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
6
votes
1 answer
Reference value of constant with KDocI 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
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
6
votes
1 answer
Combining multiple source language documentations into a single Javadoc JARIf I have a project that has java, groovy, and kotlin plugins applied with code written in each, how do I create (and should I) create a single javadoc.jar distribution with all of the code documentation?
The java plugin gives me the javadoc class,…
![]()
mkobit
5
votes
1 answer
How do I document a Kotlin package like with the Java `package-info.java` in an IntelliJ IDEA/Gradle project?kotlinlang.org says that a separate markdown file documents all packages. Is there a canonical path for that markdown file in an IntelliJ IDEA project? Is there a canonical way to process that file with Gradle? Is there a way to have these .md files…
![]()
Travis Well
5
votes
1 answer
Kotlin static field value in method documentation?I was wondering if there is a possibility to include the value of a static field of a class into the documentation of a class method.
We can link class members and parameters via square brackets:
/**
* Sets the title of the notification dialog…
![]()
Trickzter
|