When linking from module A's `Module.md` to a symb...
# dokka
w
When linking from module A's
Module.md
to a symbol in module B (such as a class or function), A must depend on B in order for the link to be resolved. Is there a specific dependency configuration that can be used when there is no other need for that dependency? I've got the link working by adding an otherwise unnecessary
compileOnly
dependency, but I'd rather not keep that. (Sorry for dominating this channel lately, it's my first time trying to get everything just right in my API docs).
I also tried adding the dependency in the task's source set like this:
Copy code
tasks.withType<AbstractDokkaLeafTask>().configureEach {
  dokkaSourceSets.configureEach {
    project(":module-B")
      .tasks.withType<AbstractDokkaLeafTask>()
      .flatMap { dokkaSourceSets }
      .filter { !it.suppress.get() }
      .forEach { dependsOn(it) }
  }
}
But this resulted in a
StackOverflowError
in module A's
dokkaHtmlPartial
task.
o
May be what described here could help: https://github.com/Kotlin/dokka/issues/463#issuecomment-1397453871 the issue describes different thing, but for me it looks similar
w
You're right, that example was just what I needed. Thank you.
o
Glad it helps, still, keep in mind, that this may stop working in future Gradle versions, so it's more like a workaround right now, until Dokka will not support it natively
👍 1