Skip to content

Latest commit

 

History

History

java-example

Java Example project

This project demonstrates how Dokka Gradle Plugin can be applied to a pure Java project to generate documentation.

This project has multiple modules.

Demonstration

To generate HTML documentation, run

gradle :dokkaGenerate

The HTML documentation will be generated into build/dokka/html.

Implementation details

Note that the org.jetbrains.dokka:kotlin-as-java-plugin Dokka Plugin must be applied for Java sources to be rendered as Java. (Despite the plugin's name, it also affects how Java sources are rendered.)

This example applies the org.jetbrains.dokka:kotlin-as-java-plugin Dokka Plugin in the ./buildSrc/src/main/kotlin/dokka-conventions.gradle.kts convention plugin.