dokka icon indicating copy to clipboard operation
dokka copied to clipboard

Merged documentation not generated

Open laim2003 opened this issue 4 years ago • 10 comments

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 avatar Apr 01 '20 18:04 laim2003

@laim2003 why is that marked with "question"? What is the solution of this problem?

jcornaz avatar Apr 03 '20 15:04 jcornaz

@jcornaz as it says in the post: "How do i generate a merged dokka documentation correctly?"

laim2003 avatar Apr 03 '20 20:04 laim2003

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.

pietrini avatar Apr 07 '20 06:04 pietrini

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.

jcornaz avatar Apr 07 '20 07:04 jcornaz

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

kamildoleglo avatar May 13 '20 00:05 kamildoleglo

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"?

laim2003 avatar May 24 '20 17:05 laim2003

Minimal Reproducible Example if you cannot post your project

kamildoleglo avatar Jul 07 '20 23:07 kamildoleglo

Sorry for the very late answer again. I will create an MRE very soon.

laim2003 avatar Dec 11 '20 11:12 laim2003

This should be a working MRE:https://gitlab.com/laim2003/dokka-issue-mre

laim2003 avatar Dec 11 '20 13:12 laim2003

Hi, @laim2003! Did you manage to solve this problem? Dokka works well with multi-module projects now, should be no issues.

IgnatBeresnev avatar Apr 27 '22 15:04 IgnatBeresnev

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.

IgnatBeresnev avatar Dec 14 '22 02:12 IgnatBeresnev