adte
02/09/2023, 12:03 AMIgnat Beresnev
02/09/2023, 12:25 AMpackage-info.java
in Java.
In regards to documenting files, I personally never felt the need to document the file itself, usually it's enough to document the declarations within the file separately. But I can see how it can be useful if you have a common file like Math.kt
with a bunch of top-level functions, and you want to provide some common documentation. I'd be interested to hear if anyone has had such cases.md
files, so you can leverage that. There's no strict rules on where the files should be defined though, as long as you can pass it to Dokka. Example of what it'll look like: https://kotlinlang.org/api/kotlinx.coroutines/
Given that it's a simple markdown file, you don't have to use Dokka and can just read it from within the IDE, of course.
Documentation on this: https://kotlinlang.org/docs/dokka-module-and-package-docs.html
For instance, in kotlinx.coroutines
you have README.md
files in the root of each module, which contain descriptions for both the module (only one) and the packages within it. Example: https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/README.md
In kotlinx.serialization
there's a single file in the root of the project that describes all modules and all packages at once. Example: https://github.com/Kotlin/kotlinx.serialization/blob/master/dokka/moduledoc.mdadte
02/09/2023, 2:32 AM