Hi all! I’m working with a kotlin multiplatform pr...
# dokka
s
Hi all! I’m working with a kotlin multiplatform project, is there a way to set the project name when generating dokka files? .html title is
shared
o
Hey! what do you mean by
project name
? title on top of the website? AFAIR there is
moduleName
property available on tasks - https://kotlinlang.org/docs/dokka-gradle.html#general-configuration
s
moduleName
doesn’t change it 😞
o
Could you show please full Dokka setup for your module?
s
Copy code
val dokkaOutputDir = "../docs/$version"
tasks.dokkaHtml {
  val currentVersion = version
  outputDirectory.set(file(dokkaOutputDir))
  dokkaSourceSets {
    configureEach {
      suppress.set(false)
      documentedVisibilities.set(setOf(Visibility.PUBLIC))
      skipEmptyPackages.set(true)
      includeNonPublic = false
      reportUndocumented = true
      skipEmptyPackages = true
    }
  }
  pluginConfiguration<VersioningPlugin, VersioningConfiguration> {
    version = currentVersion
    olderVersionsDir = file("../docs")
    renderVersionsNavigationOnAllPages = true
  }
}
my bad, you’re right
moduleName
works, it was a problem with how I was handling multi-module project
o
yeah, in case of multi-module project you need to do:
Copy code
tasks.dokkaHtmlMultiModule {
    moduleName.set("Custom name")
}
in root project
🙌 1