dokka
dokka copied to clipboard
Filtering generated docs using annotations / tags / etc
By default dokka generates documentation based on public members. It's also possible to set an option to include non public members as well. There is also an option to filter by package prefix.
However there is another scenario which is not supported.
Imagine you have a public class with some protected abstract methods which should be overridden. In this case it would be useful that this method gets documented and included in the documentation.
Alternatively, you may want to expose only some public methods, but not others (so the documentation is concise).
Currently, with javadoc, I'm using a custom doclet which includes only members that have been marked with @PublicAPI
annotation, so if a member is not marked, it's not included in the resulting doc.
Am I right, that currently this is not possible with dokka? Would you consider this a useful feature? If not, any hints on how could I implement this on my own?
This currently not possible with Dokka. Looks like a useful feature. You could make PR to Dokka to support this
Take a look at DocumentationBuilder.kt
, a function DeclarationDescriptor.isDocumented
It is really easy to do now using dokka plugin. We can take a look to see if we can make it configurable from gradle.
Has something changed regarding this functionality? I want to remove documentation about elements(classes, methods and etc.) with a specific annotation from the final output of Dokka tasks.
Similar request: #1861