dokka
dokka copied to clipboard
Modules with kapt plugin fails with implicit dependency error
Describe the bug
After ugrading Gradle to 8.2.1, Kotlin to 1.9.0 and Dokka to 1.8.20 the modules using kapt plugins started failing on :dokkaHtml
gradle task execution with implicit dependency error.
Expected behaviour Dokka successfully finishes.
Screenshots
Reason: Task ':kaptmodule:dokkaHtml' uses this output of task ':kaptmodule:kaptDebugKotlin' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.
Possible solutions:
1. Declare task ':kaptmodule:kaptDebugKotlin' as an input of ':kaptmodule:dokkaHtml'.
2. Declare an explicit dependency on 'kaptmodule:kaptDebugKotlin' from ':kaptmodule:dokkaHtml' using Task#dependsOn.
3. Declare an explicit dependency on ':kaptmodule:kaptDebugKotlin' from ':kaptmodule:dokkaHtml' using Task#mustRunAfter.
For more information, please refer to https://docs.gradle.org/8.2.1/userguide/validation_problems.html#implicit_dependency in the Gradle documentation.
To Reproduce
run :dokkaHtml
2 times. It will fail on the 2nd run, probably something related to Gradle caching.
Dokka configuration Configuration of dokka used to reproduce the bug
tasks.dokkaHtml.configure {
outputDirectory.set(file("../documentation/kaptmodule"))
this.dokkaSourceSets.getByName("main") {
skipDeprecated.set(true)
includeNonPublic.set(false)
skipEmptyPackages.set(true)
reportUndocumented.set(false)
perPackageOption {
matchingRegex.set(".*\\.internal.*") // will match internal and all sub-packages of it
suppress.set(true)
}
}
}
Installation
- Operating system: macOS 13.5
- Build tool: Gradle v8.2.1
- Dokka version: 1.8.20