solonovamax
10/03/2025, 5:10 AMAdam Semenenko
10/06/2025, 9:44 AM./gradlew :dokkaGenerate.
The attached screenshot shows the 'incorrect' output, right?
My guess is an input isn't declared correctly, so locally Dokka is picking up a stale file. Could you try running ./gradlew clean :dokkaGenerate and then check?Adam Semenenko
10/06/2025, 10:00 AMprocessDokkaIncludes task.
In buildSrc/src/main/kotlin/kt-fuzzy.dokka.gradle.kts, make this change:
dokka {
moduleName = nyx.info.name
moduleVersion = nyx.info.version
dokkaSourceSets.configureEach {
// hardcoding the directory means Gradle won't run `processDokkaIncludes` task
//includes.from(dokkaDirs.includesOutput.asFileTree.files)
// Instead, use the task reference so Gradle automatically runs `processDokkaIncludes`
includes.from(files(processDokkaIncludes).asFileTree.files)solonovamax
10/06/2025, 8:33 PMMy guess is an input isn't declared correctly, so locally Dokka is picking up a stale file. Could you try runningafaik Jenkins will clean the directory every single run, however it could be getting cached in the gradle home directoryand then check?./gradlew clean :dokkaGenerate
solonovamax
10/06/2025, 8:36 PMprocessDokkaIncludes, it does later declare the dependency:
tasks {
withType<DokkaGenerateTask>().configureEach {
inputs.files(dokkaDirs.stylesOutput, dokkaDirs.assets, dokkaDirs.templates, dokkaDirs.scripts)
dependsOn(compileDokkaSass, processDokkaIncludes)
}
}
so it should still work?solonovamax
10/06/2025, 8:36 PMThe attached screenshot shows the 'incorrect' output, right?and yeah, that's the incorrect output
solonovamax
10/06/2025, 8:46 PMdokkaGeneratePublicationHtml --dry-run, then it shows that the processDokkaIncludes task would be run. further, if I use gradle task tree, it shows that it is definitely a dependency of dokkaGeneratePublicationHtml .
but I can try to use what you said instead to see if it'll fix anythingsolonovamax
10/06/2025, 8:59 PMclean dokkaGenerate --no-build-cache --no-configuration-cache --rerun-tasks (without the suggested changes), I'm now having a very different funky issue which I thought had gone away, where in the multimodule documentation it's only showing a single module even though it should be showing both of themsolonovamax
10/06/2025, 9:13 PMclean task, I run dokkaGenerate twice, then it produces the correct outputs. some task dependency here probably isn't getting properly propagated, and I feel like for the multimodule stuff at least that's on dokka's endsolonovamax
10/06/2025, 9:14 PMsolonovamax
10/06/2025, 9:16 PMsolonovamax
10/06/2025, 9:22 PMdokkaGenerate or dokkaGeneratePublicationHtml, but not if I run :dokkaGenerate or :dokkaGeneratePublicationHtml (which only run the task for the root project and not any of the subprojects), which is... odd.
it also does not happen with dokkaGenerateModuleHtml or :dokkaGenerateModuleHtml.solonovamax
10/06/2025, 9:23 PM--no-build-cache --no-configuration-cache --rerun-taskssolonovamax
10/06/2025, 9:31 PMclean dokkaGeneratePublicationHtml
for a while there is no html present, which is expected because of the clean task, however a bit before it's done, only the documentation for the kotlin fuzzy module is present.
once the task is fully completed, then it is overwritten by the documentation for the kotlin string similarity module (as shown before).
my theory behind what is happening is the following:
1. when it is run, the kotlin fuzzy module finishes first because it has the least amount of pages & things to document. it gets added on to what was previously completed, if anything exists. so if it was run previously and not `clean`ed, then it will be added on to that. but if there's nothing, it writes a new file.
2. next, when the kotlin string similarity module finishes, it completely overwrites whatever was there, regardless of if it was written in the same run.solonovamax
10/06/2025, 9:37 PMAdam Semenenko
10/07/2025, 6:42 AMorg.gradle.configureondemand=true in gradle.properties and re-running?solonovamax
10/10/2025, 12:47 AM--no-configuration-cache (in addition to the other flags) (which should have the same effect as setting org.gradle.configureondemand=false) produces the same behavioursolonovamax
10/10/2025, 12:54 AMclean dokkaGeneratePublcationHtml & --no-configuration-cache
it also happens with & without your suggested changesAdam Semenenko
10/13/2025, 2:27 PMgradle clean
2. Run gradle :dokkaGen - the output is incorrect.
3. Run gradle :dokkaGen again - the output is correct.
When I look at kt-string-similarity/build/tmp/dokkaGenerateModuleHtml/dokka-configuration.json after step 2 I see the includes aren't present, but after step 3 they are.Adam Semenenko
10/13/2025, 2:37 PMbuildSrc/src/main/kotlin/kt-fuzzy.dokka.gradle.kts please make this change:
dokka {
dokkaSourceSets.configureEach {
//includes.from(dokkaDirs.includesOutput.asFileTree.files)
includes.from(dokkaDirs.includesOutput.asFileTree.elements)
asFileTree.files will eagerly evaluate the files, which means no files until after the task has run. asFileTree.elements returns a provider, which is lazily evaluated after the task has run.