Jacob Wingate
01/09/2025, 1:22 PMdokkaHtml
is populating elements that lack KDoc annotations, including a "Package-level declarations" section. My understanding was that only KDoc-annotated code should be included by default, but this does not seem to be the case in my project.
I have attached an example showing the "Package-level declarations" being generated without corresponding KDoc annotations.
Below is my current build.gradle
configuration:
tasks.dokkaHtml {
dokkaSourceSets {
named("main") {
sourceRoots.from(file("src/main/kotlin"))
displayName.set("Main Documentation")
suppress.set(false)
reportUndocumented.set(false) // Exclude undocumented elements
}
named("test") {
sourceRoots.from(file("src/test/kotlin"))
displayName.set("Test Documentation")
suppress.set(false)
reportUndocumented.set(false)
}
}
}
Any help would be greatly appreciated!glureau
01/09/2025, 4:35 PMMy understanding was that only KDoc-annotated code should be included by defaultI think it's a wrong assumption. Dokka is supposed to expose a developer api, so everything that is visible from a developer using the library.
reportUndocumented.set(false) // Exclude undocumented elementsFrom documentation: Whether to emit warnings about visible undocumented declarations, that is declarations without KDocs after they have been filtered by
documentedVisibilities
and other filters.
So that's only saying at dokka to not warn, it doesn't exclude the undocumented elements.CLOVIS
01/09/2025, 5:23 PMJacob Wingate
01/10/2025, 8:03 AMglureau
01/10/2025, 8:20 AMJacob Wingate
01/10/2025, 8:43 AMCLOVIS
01/10/2025, 8:57 AMJacob Wingate
01/14/2025, 11:37 AM