Hey guys, I’m trying to set up Dokka in a mono-rep...
# announcements
o
Hey guys, I’m trying to set up Dokka in a mono-repo that contains multiple Kotlin (v1.3.72) libraries and uses Gradle (v6.4.1). I have a top-level
build.gradle.kts
script in which I apply the Dokka plugin to all libraries -
Copy code
configure(subprojects.filter { it.parent?.name == "libs" }) {
    apply {
        plugin("org.jetbrains.dokka")
    }
}
I’ve also added the following block that is mentioned in the docs for multi module support -
Copy code
tasks.dokkaHtmlMultiModule.configure {
    outputDirectory.set(buildDir.resolve("dokkaCustomMultiModuleOutput"))
    documentationFileName.set("README.md")
}
I also have a
README.md
file under each of my libraries under
libs
folder, and I added the following to the
build.gradle.kts
script of each of the libraries which I want to include in the generated docs -
Copy code
tasks.withType<org.jetbrains.dokka.gradle.DokkaTask>().configureEach {
    dokkaSourceSets.configureEach {
        includes.from("README.md")
    }
}
After running
dokkaHtmlMultiModule
, it seems like I get a folder for each library under
build/dokkaCustomMultiModuleOutput/libs
(with all generated docs inside), but I can’t seem to find any top-level
index.html
file. In addition, none of the libraries are listed in the top level
-modules.html
file. Am I missing something, or doing something wrong? Thanks in advance 🙏