dokka
dokka copied to clipboard
Merged documentation not generated
Question When trying to create a merged documentation, only the module-specific documentation is generated.
Installation
- Operating system: Windows 10
- Build tool: Gradle v5.4.1
- Dokka version: 0.10.1
- Android Studio 3.6.2
Additional context
My project contains the following modules:
In projectDir
:
app
In projectDir/appModules
:
account
ar
auth
core
core-ui
dashboard
feedback
pluginSystem
preferences
store
wizard
All modules are correctly referenced in settings.gradle.kts
.
In my app
module the build.gradle.kts
file contains this dokka configuration:
tasks {
val dokka by getting(org.jetbrains.dokka.gradle.DokkaTask::class) {
println("loading dokka config")
outputFormat = "html"
outputDirectory = "$buildDir/documentation"
subProjects = listOf(":app", ":account", ":ar", ":auth", ":core", ":core-ui", ":dashboard", ":feedback", ":pluginSystem", ":preferences", ":store", ":wizard")
configuration{
moduleName = "Friday"
}
println(subProjects)
}
}
The app
module implements all other modules.
My problem is, that dokka is correctly generating a documentation for the app
module, but this documentation is not merged with other modules. How do I create a merged documentation correctly?
Thanks in advance.
@laim2003 why is that marked with "question"? What is the solution of this problem?
@jcornaz as it says in the post: "How do i generate a merged dokka documentation correctly?"
I have the same issue, does someone knows how to do it ? I know its possible to generate documentation and sources from a dedicated merged module, but it's a bit overkill IMO.
Sorry @laim2003, I didn't realize you labeled your own question. I thought that it was labeled "question" by one of the collaborator in this repository without giving any answer.
Can you please post a link to your project or create an MRE? I can't seem to reproduce it right now.
Anyway, what subProjects
does is it just collects the source roots and classpaths from all listed subprojects and appends them to the current configuration. As a workaround you can do it manually
Sorry for my late answer. I wish I could, but I cannot post a link to my project because its a private repo. What do you mean by "MRE"?
Minimal Reproducible Example if you cannot post your project
Sorry for the very late answer again. I will create an MRE very soon.
This should be a working MRE:https://gitlab.com/laim2003/dokka-issue-mre
Hi, @laim2003! Did you manage to solve this problem? Dokka works well with multi-module projects now, should be no issues.
As has been mentioned above, Dokka works well with multi-project builds now - you need to apply the Dokka Gradle plugin in your root build script, and then run dokkaHtmlMultiModule
task. An example of a multi-project build can be seen here: examples/gradle/dokka-multimodule-example
I'm closing the issue as outdated / not relevant anymore, but do let us know if you experience any issues related to this.