Questions tagged [kdoc]

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

Documenting Kotlin code

70 questions
1
vote
0 answers

How to set output html global lang attribute in Dokka?

If I run the Dokka gradle script on a PC with English as system language, javadoc/kdoc html files have at the top, but if I do it with the system language set to Spanish, it will replace it with everywhere. Is there…
DuckN'Bear
  • 365
  • 1
  • 4
  • 19
1
vote
1 answer

How to generate source.jar of the public API of a closed source AAR?

We develop a closed sources library in Kotlin that is released as AAR. Unfortunatly our users can't see the KDoc (JavaDoc for Kotlin) in the IDE. Therefore we want to release the source of the public API only. The internals and the public API can be…
Chriss
  • 5,157
  • 7
  • 41
  • 75
1
vote
1 answer

Using @link with aliases in kDoc

In Java documentation I can do the following: /** * {@link FancyComp mFancy} is a variable that you need */ How do I do this in Kotlin doc for the same result of course?
salyela
  • 1,325
  • 3
  • 14
  • 26
1
vote
0 answers

Markdown # vs multiple #

I noticed that the use of # or ## or #### is equivalent... will the always be the case? I want to use only a '#' sometimes because it is more convenient, as long as it doesn't become much bigger text in the future. I'm not sure if this applies to…
ycomp
  • 8,316
  • 19
  • 57
  • 95
0
votes
0 answers

How to add additional markdown content to Dokka-generated (Kotlin KDoc) documentation?

I'm trying to add additional documentation pages (not tied to a class or package element) to a Dokka-generated documentation tree. I know that I can add a module.md or a file for each package, but if I want to add additional pages (e.g. an…
LBushkin
  • 129,300
  • 32
  • 216
  • 265
0
votes
1 answer

Is there a maximum line length for KDoc?

In JavaDoc, lines must be 80 characters or less (not including the not-shown parts of expressions like {@code} and {@link}). Is there a line length limit to KDoc? It's certainly not 80, as I've found lines in stdlib up to 112 characters long. Does…
Moiré
  • 75
  • 1
  • 8
0
votes
1 answer

Kotlin probleme with generating Kdoc

Hi i am having trouble with Kdoc so i followed this : https://blog.jetbrains.com/kotlin/2020/08/dokka-preview-based-on-kotlin-1-4-0-rc/ I was able to add the plugins in the gradle base project, then with the command ./gradlew dokkaHtml on the…
XCarb
  • 735
  • 10
  • 31
0
votes
1 answer

Unable to generate Kdoc using Dokka

I am trying to generate a KDoc documentation in an Android project. Following are the relevant files for adding this functionality. build.gradle (root level): buildscript { ... ext.dokka_version = "0.10.1" repositories { ... …
0
votes
0 answers

How to include annotations in generated kdoc

I have a spring boot project with methods that have annotations on them, e.g.: @PreAuthorize("hasPermission('organization', '$USERS_MANAGE' )") fun listUsers(userContext: UserContext): List { return…
Dambakk
  • 595
  • 4
  • 20
0
votes
0 answers

How to reference custom attribute from the KDoc of class?

I have a custom View class and in its comment, I want to type something like: /** * (...) * When using this view, specify [myView_screenName] in the layout. */ If in the [] parentheses in KDoc is a method, Android Studio automatically links…
Smeagol
  • 593
  • 9
  • 23
1 2 3 4
5