aboutsummaryrefslogtreecommitdiff
path: root/examples/gradle/dokka-gradle-example
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-01-19 04:10:57 +0100
committerGitHub <noreply@github.com>2023-01-19 04:10:57 +0100
commit5eeb2bbeb8c71ae813808ee0e8d09293c4abe1c1 (patch)
treebb62ab50a59cbeca06de6fd1eb5c75ff27bc5bd0 /examples/gradle/dokka-gradle-example
parent1fa8552994fb292729eca8c0de6a1561380b008c (diff)
downloaddokka-5eeb2bbeb8c71ae813808ee0e8d09293c4abe1c1.tar.gz
dokka-5eeb2bbeb8c71ae813808ee0e8d09293c4abe1c1.tar.bz2
dokka-5eeb2bbeb8c71ae813808ee0e8d09293c4abe1c1.zip
Revise README documentation for examples and plugins (#2736)
Diffstat (limited to 'examples/gradle/dokka-gradle-example')
-rw-r--r--examples/gradle/dokka-gradle-example/README.md22
-rw-r--r--examples/gradle/dokka-gradle-example/build.gradle.kts6
-rw-r--r--examples/gradle/dokka-gradle-example/demo.pngbin0 -> 71039 bytes
3 files changed, 28 insertions, 0 deletions
diff --git a/examples/gradle/dokka-gradle-example/README.md b/examples/gradle/dokka-gradle-example/README.md
new file mode 100644
index 00000000..3401e8e9
--- /dev/null
+++ b/examples/gradle/dokka-gradle-example/README.md
@@ -0,0 +1,22 @@
+# Dokka Gradle example
+
+This example demonstrates how to apply Dokka in a simple single-project Gradle build, as well as how to configure it.
+
+Configuration changes:
+
+* Custom project name used in the header, `Dokka Gradle Example`.
+* Description for the project and the packages taken from [Module.md](Module.md).
+* Documentation contains source links that lead to declarations in this GitHub repository.
+
+You can see up-to-date documentation generated for this example on
+[GitHub Pages](https://kotlin.github.io/dokka/examples/dokka-gradle-example/html/index.html).
+
+![screenshot demonstration of output](demo.png)
+
+### Running
+
+Run `dokkaHtml` task to generate documentation for this example:
+
+```bash
+./gradlew dokkaHtml
+```
diff --git a/examples/gradle/dokka-gradle-example/build.gradle.kts b/examples/gradle/dokka-gradle-example/build.gradle.kts
index ac62fccd..db3d91b9 100644
--- a/examples/gradle/dokka-gradle-example/build.gradle.kts
+++ b/examples/gradle/dokka-gradle-example/build.gradle.kts
@@ -18,8 +18,14 @@ dependencies {
tasks.withType<DokkaTask>().configureEach {
dokkaSourceSets {
named("main") {
+ // used as project name in the header
moduleName.set("Dokka Gradle Example")
+
+ // contains descriptions for the module and the packages
includes.from("Module.md")
+
+ // adds source links that lead to this repository, allowing readers
+ // to easily find source code for inspected declarations
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl.set(URL("https://github.com/Kotlin/dokka/tree/master/" +
diff --git a/examples/gradle/dokka-gradle-example/demo.png b/examples/gradle/dokka-gradle-example/demo.png
new file mode 100644
index 00000000..4462f3b5
--- /dev/null
+++ b/examples/gradle/dokka-gradle-example/demo.png
Binary files differ