Shreck Ye
Shreck Ye

Reputation: 1869

How to add top level KDoc for a file?

Is there a way to add a piece of top level KDoc for a Kotlin file?

Since Kotlin supports multiple variables, functions, classes, etc. in a single file, it makes sense to document the file as a whole. However, Documenting Kotlin Code - Kotlin Programming Language seems not to have any instructions on this.

Upvotes: 13

Views: 1182

Answers (1)

Iaroslav Postovalov
Iaroslav Postovalov

Reputation: 2463

There's no such feature; however, packages and modules can be documented like in Java

In Dokka, additional documentation files are added with include property (e.g. Gradle configuration).

Upvotes: 1

Related Questions