peterthee
04/01/2025, 11:49 AMtask generateTestDocs(type: DokkaTask) {
dokkaSourceSets {
...
}
}
task generateAppDocs(type: DokkaTask) {
dokkaSourceSets {
...
}
}
Now in Dokka 2, whenever I register a DokkaTask like so I get an exception:
tasks.register<DokkaTask>("generateTestDocs") {
outputDirectory.set(layout.buildDirectory.dir("testDocs"))
...
}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':generateTestDocs'.
> java.lang.ClassNotFoundException: org.jetbrains.dokka.DokkaBootstrapImpl
I have read through the migration guide, but couldnt really determine whether that should still be an option. Generating a single output file does work, but we are required by process to have them independently. Could you give me any suggestion howto generate independent reports for different source sets within one project?Adam Semenenko
04/01/2025, 12:08 PMdokka {}
dsl, instead of manually creating tasks. DGPv2 will automatically create and configure the required tasks for all DokkaSourceSets.
dokka {
dokkaSourceSets.register("appDocs") {
// ...
}
dokkaSourceSets.register("testDocs") {
// ...
}
}
peterthee
04/01/2025, 12:47 PMdokka{
dokkaSourceSets.register("appDocs"){
displayName.set("Main")
}
dokkaSourceSets.register("testDocs"){
displayName.set("Test")
sourceRoots.from(file("src/test/java"))
suppress.set(false)
}
}
The result is a single report which contains both sourceSets, please see my screenshot. Is it possible to generate completely independent reports for each sourceSet? Am I doing something wrong here?Adam Semenenko
04/01/2025, 4:19 PMpeterthee
04/02/2025, 6:52 AMAdam Semenenko
04/02/2025, 3:55 PMpeterthee
04/03/2025, 7:16 AM