aboutsummaryrefslogtreecommitdiff
path: root/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
diff options
context:
space:
mode:
Diffstat (limited to 'examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts')
-rw-r--r--examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts35
1 files changed, 24 insertions, 11 deletions
diff --git a/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts b/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
index 397ad22f..66b32b18 100644
--- a/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
+++ b/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
@@ -1,19 +1,32 @@
+import org.jetbrains.dokka.DokkaConfiguration.Visibility
+import org.jetbrains.dokka.gradle.DokkaTaskPartial
+
plugins {
- /**
- * Kotlin plugin necessary because of potential Gradle bug!
- * This is not necessary if the kotlin gradle plugin is added as buildscript
- * dependency like
- *
- * buildscript {
- * dependencies {
- * classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
- * }
- * }
- */
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
+ ))
+ }
+ }
+}
+
+// Configures only the parent MultiModule task,
+// this will not affect subprojects
+tasks.dokkaHtmlMultiModule {
+ moduleName.set("Dokka MultiModule Example")
+}
+
dependencies {
implementation(kotlin("stdlib"))
}