This project demonstrates how to use Dokka Gradle Plugin to aggregate modules across a composite build projects.
Warning
HTML is the only format that correctly supports multimodule aggregation.
The example project has four included builds:
build-logic
contains Kotlin/JVM and Dokka Gradle Plugin convention plugins.module-kakapo
andmodule-kea
(named after New Zealand birds) represent regular Kotlin/JVM projects.docs
aggregates the modules.
Run the :docs:dokkaGenerate
Gradle task to generate documentation with the custom logo:
./gradlew :docs:dokkaGenerate
Important
When Dokka Gradle Plugin aggregates modules, each module must have a distinct modulePath
.
When using composite builds, project paths may clash, so make sure to set a distinct modulePath
.
The module path determines where each Dokka Module will be located within an aggregated Dokka Publication.
By default, the module path is set to be the project path, which are distinct for a single Gradle build. With composite builds the project paths may not be distinct, causing Dokka Gradle Plugin to overwrite modules.
This can be achieved in a convention plugin. build-logic/src/main/kotlin/dokka-convention.gradle.kts.