aboutsummaryrefslogtreecommitdiff
path: root/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject
diff options
context:
space:
mode:
Diffstat (limited to 'dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject')
-rw-r--r--dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/build.gradle.kts38
-rw-r--r--dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/ModuleA.md5
-rw-r--r--dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/build.gradle.kts16
-rw-r--r--dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/src/main/kotlin/demo/ChildProjectAClass.kt8
-rw-r--r--dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/ModuleB.md5
-rw-r--r--dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/build.gradle.kts16
-rw-r--r--dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/src/main/kotlin/demo/ChildProjectBClass.kt8
7 files changed, 96 insertions, 0 deletions
diff --git a/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/build.gradle.kts b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/build.gradle.kts
new file mode 100644
index 00000000..3563ecca
--- /dev/null
+++ b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/build.gradle.kts
@@ -0,0 +1,38 @@
+import org.jetbrains.dokka.DokkaConfiguration.Visibility
+import org.jetbrains.dokka.gradle.DokkaTaskPartial
+import java.net.URL
+
+plugins {
+ kotlin("jvm")
+ id("org.jetbrains.dokka")
+}
+
+// You can apply and configure Dokka in each subproject
+// individially or configure all subprojects at once
+subprojects {
+ apply(plugin = "org.jetbrains.dokka")
+
+ tasks.withType<DokkaTaskPartial>().configureEach {
+ dokkaSourceSets.configureEach {
+ documentedVisibilities.set(setOf(
+ Visibility.PUBLIC,
+ Visibility.PROTECTED
+ ))
+
+ // Read docs for more details: https://kotlinlang.org/docs/dokka-gradle.html#source-link-configuration
+ sourceLink {
+ val exampleDir = "https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-multimodule-example"
+
+ localDirectory.set(rootProject.projectDir)
+ remoteUrl.set(URL("$exampleDir"))
+ remoteLineSuffix.set("#L")
+ }
+ }
+ }
+}
+
+// Configures only the parent MultiModule task,
+// this will not affect subprojects
+tasks.dokkaHtmlMultiModule {
+ moduleName.set("Dokka MultiModule Example")
+}
diff --git a/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/ModuleA.md b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/ModuleA.md
new file mode 100644
index 00000000..12712d97
--- /dev/null
+++ b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/ModuleA.md
@@ -0,0 +1,5 @@
+# Module childProjectA
+This is the child module A
+
+# Package demo
+This package contains a few examples of Dokka usage.
diff --git a/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/build.gradle.kts b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/build.gradle.kts
new file mode 100644
index 00000000..7b3b1e23
--- /dev/null
+++ b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/build.gradle.kts
@@ -0,0 +1,16 @@
+import org.jetbrains.dokka.gradle.DokkaTaskPartial
+
+plugins {
+ kotlin("jvm")
+ id("org.jetbrains.dokka")
+}
+
+// configuration specific to this subproject.
+// notice the use of Partial task
+tasks.withType<DokkaTaskPartial>().configureEach {
+ dokkaSourceSets {
+ configureEach {
+ includes.from("ModuleA.md")
+ }
+ }
+}
diff --git a/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/src/main/kotlin/demo/ChildProjectAClass.kt b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/src/main/kotlin/demo/ChildProjectAClass.kt
new file mode 100644
index 00000000..533b305c
--- /dev/null
+++ b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectA/src/main/kotlin/demo/ChildProjectAClass.kt
@@ -0,0 +1,8 @@
+@file:Suppress("unused")
+
+package demo
+
+/**
+ * Class defined in child project a
+ */
+class ChildProjectAClass
diff --git a/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/ModuleB.md b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/ModuleB.md
new file mode 100644
index 00000000..18a92a33
--- /dev/null
+++ b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/ModuleB.md
@@ -0,0 +1,5 @@
+# Module childProjectB
+This is the child module B
+
+# Package demo
+This package contains a few examples of Dokka usage.
diff --git a/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/build.gradle.kts b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/build.gradle.kts
new file mode 100644
index 00000000..e8b40d4a
--- /dev/null
+++ b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/build.gradle.kts
@@ -0,0 +1,16 @@
+import org.jetbrains.dokka.gradle.DokkaTaskPartial
+
+plugins {
+ kotlin("jvm")
+ id("org.jetbrains.dokka")
+}
+
+// configuration specific to this subproject.
+// notice the use of Partial task
+tasks.withType<DokkaTaskPartial>().configureEach {
+ dokkaSourceSets {
+ configureEach {
+ includes.from("ModuleB.md")
+ }
+ }
+}
diff --git a/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/src/main/kotlin/demo/ChildProjectBClass.kt b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/src/main/kotlin/demo/ChildProjectBClass.kt
new file mode 100644
index 00000000..6bfd22eb
--- /dev/null
+++ b/dokka-runners/dokkatoo/examples/multimodule-example/dokka/parentProject/childProjectB/src/main/kotlin/demo/ChildProjectBClass.kt
@@ -0,0 +1,8 @@
+@file:Suppress("unused")
+
+package demo
+
+/**
+ * Class defined in child module b
+ */
+class ChildProjectBClass