addamsson
02/10/2020, 1:36 PMtasks {
withType<DokkaTask> {
outputFormat = "html"
outputDirectory = "docs"
subProjects = rootProject.childProjects.map { it.key }
multiplatform {
rootProject.childProjects.forEach { (name, project) ->
register(name) {
targets = listOf("JVM", "JS")
listOf("commonMain", "jvmMain", "jsMain").forEach { dir ->
val sourceDir = "${projectDir}/$name/src/$dir/kotlin"
if (File(sourceDir).exists()) {
sourceRoot {
path = "${projectDir}/$name/src/$dir/kotlin"
}
}
}
}
}
}
}
}
What am I doing wrong? I'm trying to register each module and their corresponding sources, but it is not working.
The docs are generated but it is not grouped by subprojects and I also get hundreds of errors stating that Found an unresolved type
and other errors stating that Cannot extract sources from subProjects. Do you have the Kotlin plugin in version 1.3.30+ and the Kotlin plugin applied in the root project?
and Could not find target with name: myproject
. How am I supposed to use Dokka for my setup?Kamil Doległo
02/10/2020, 4:54 PMmultiplatform
closure you should only register platforms you want to document (like jvm
and js
)addamsson
02/10/2020, 5:34 PMaddamsson
02/10/2020, 5:34 PMaddamsson
02/10/2020, 5:34 PM