darkmoon_uk
10/28/2024, 8:46 PMpackage.kt
documentation?
If the format is:
/**
* Package documentation goes here, and here's a [Symbol] reference. <-- Symbol can't be resolved; not imported yet
*/
package my.package
import my.Symbol // Import has to go here by Kotlin convention; but it's too late to import for the package documentation!
...even with fully qualified names in the comment (i.e. [my.Symbol]
), the IDE highlights these as unresolvable.
Is there a design limitation with referencing symbols in package.kt
documentation files? Is there some way to place the package documentation after imports?Oleg Yukhnevich
10/31/2024, 7:24 AMpackage.kt
files?
It's not possible to document packages in Kotlin files directly (there is no package-info.java
alternative in Kotlin)
If you do want to document packages, there is a specific formatted file to be provided to Dokka: https://kotlinlang.org/docs/dokka-module-and-package-docs.html