aboutsummaryrefslogtreecommitdiff
path: root/examples/gradle/dokka-versioning-multimodule-example/parentProject
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gradle/dokka-versioning-multimodule-example/parentProject')
-rw-r--r--examples/gradle/dokka-versioning-multimodule-example/parentProject/build.gradle.kts25
-rw-r--r--examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectA/build.gradle.kts3
-rw-r--r--examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectA/src/main/kotlin/demo/ChildProjectAClass.kt8
-rw-r--r--examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectB/build.gradle.kts3
-rw-r--r--examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectB/src/main/kotlin/demo/ChildProjectBClass.kt8
5 files changed, 47 insertions, 0 deletions
diff --git a/examples/gradle/dokka-versioning-multimodule-example/parentProject/build.gradle.kts b/examples/gradle/dokka-versioning-multimodule-example/parentProject/build.gradle.kts
new file mode 100644
index 00000000..3abd1ab3
--- /dev/null
+++ b/examples/gradle/dokka-versioning-multimodule-example/parentProject/build.gradle.kts
@@ -0,0 +1,25 @@
+import org.jetbrains.dokka.gradle.DokkaMultiModuleTask
+
+dependencies {
+ implementation(kotlin("stdlib"))
+}
+
+val olderVersionsFolder = "olderVersions"
+
+// The previously documentations should be generated with the versioning plugin
+val generatePreviouslyDocTask by tasks.register<DokkaMultiModuleTask>("dokkaPreviouslyDocumentation") {
+ dependencies {
+ dokkaPlugin("org.jetbrains.dokka:all-modules-page-plugin:1.6.0")
+ dokkaPlugin("org.jetbrains.dokka:versioning-plugin:1.6.0")
+ }
+ val configuredVersion = "0.9"
+ outputDirectory.set(file(projectDir.toPath().resolve(olderVersionsFolder).resolve(configuredVersion)))
+ pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.versioning.VersioningPlugin" to """{ "version": "$configuredVersion" }"""))
+ addChildTasks(listOf(project("childProjectA"), project("childProjectB")), "dokkaHtmlPartial")
+}
+
+tasks.dokkaHtmlMultiModule {
+ dependsOn(generatePreviouslyDocTask)
+ val configuredVersion = "1.0"
+ pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.versioning.VersioningPlugin" to """{ "version": "$configuredVersion", "olderVersionsDir": "$projectDir/$olderVersionsFolder" }"""))
+} \ No newline at end of file
diff --git a/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectA/build.gradle.kts b/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectA/build.gradle.kts
new file mode 100644
index 00000000..dd9f5199
--- /dev/null
+++ b/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectA/build.gradle.kts
@@ -0,0 +1,3 @@
+dependencies {
+ implementation(kotlin("stdlib"))
+} \ No newline at end of file
diff --git a/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectA/src/main/kotlin/demo/ChildProjectAClass.kt b/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectA/src/main/kotlin/demo/ChildProjectAClass.kt
new file mode 100644
index 00000000..533b305c
--- /dev/null
+++ b/examples/gradle/dokka-versioning-multimodule-example/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/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectB/build.gradle.kts b/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectB/build.gradle.kts
new file mode 100644
index 00000000..fceff829
--- /dev/null
+++ b/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectB/build.gradle.kts
@@ -0,0 +1,3 @@
+dependencies {
+ implementation(kotlin("stdlib"))
+}
diff --git a/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectB/src/main/kotlin/demo/ChildProjectBClass.kt b/examples/gradle/dokka-versioning-multimodule-example/parentProject/childProjectB/src/main/kotlin/demo/ChildProjectBClass.kt
new file mode 100644
index 00000000..6bfd22eb
--- /dev/null
+++ b/examples/gradle/dokka-versioning-multimodule-example/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