dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Filtering generated docs using annotations / tags / etc

Open armatys opened this issue 7 years ago • 4 comments

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?

armatys avatar Dec 08 '17 14:12 armatys

This currently not possible with Dokka. Looks like a useful feature. You could make PR to Dokka to support this

semoro avatar Feb 01 '18 16:02 semoro

Take a look at DocumentationBuilder.kt, a function DeclarationDescriptor.isDocumented

semoro avatar Feb 01 '18 16:02 semoro

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.

Kordyjan avatar Aug 31 '20 13:08 Kordyjan

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.

tripolkaandrey avatar Mar 22 '22 15:03 tripolkaandrey

Similar request: #1861

IgnatBeresnev avatar Mar 14 '23 01:03 IgnatBeresnev