dokka
dokka copied to clipboard
How to show documentation for selected private properties only?
Question Consider that I have a class as follows:
/**
* This is an example class
* @constructor This is how I describe my primary constructor
* @property sum docs A
* @property product docs B
*/
class Example(
private val sum: Int,
private val product: Int
) { /*...*/ }
Now my issue is that since sum and product are both private, they do not show up in the dokka HTML generated documentation. I looked up how I could change the Gradle build configuration to say that I should include private visibility. However, it would enable that for the whole project, which I do not want to do.
How do I make Dokka know to show the documentation for the private properties just for this Example class?
Installation
- Operating system: Linux 6.6.30-1-lts amd64
- Build tool: Gradle v8.7
- Dokka version: 1.9.20
What I needed to use was @param instead of @property. Since sum and product are properties of Example and not parameters, it is not exactly what I had in mind but this would make do.