diff options
Diffstat (limited to 'examples/gradle/dokka-multimodule-example/parentProject')
-rw-r--r-- | examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts | 35 | ||||
-rw-r--r-- | examples/gradle/dokka-multimodule-example/parentProject/childProjectA/ModuleA.md (renamed from examples/gradle/dokka-multimodule-example/parentProject/childProjectA/Module.md) | 2 | ||||
-rw-r--r-- | examples/gradle/dokka-multimodule-example/parentProject/childProjectA/build.gradle.kts | 4 | ||||
-rw-r--r-- | examples/gradle/dokka-multimodule-example/parentProject/childProjectB/ModuleB.md (renamed from examples/gradle/dokka-multimodule-example/parentProject/childProjectB/Module.md) | 2 | ||||
-rw-r--r-- | examples/gradle/dokka-multimodule-example/parentProject/childProjectB/build.gradle.kts | 4 |
5 files changed, 32 insertions, 15 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")) } diff --git a/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/Module.md b/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/ModuleA.md index e6cf0e04..12712d97 100644 --- a/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/Module.md +++ b/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/ModuleA.md @@ -1,5 +1,5 @@ # Module childProjectA -This is the child module a +This is the child module A # Package demo This package contains a few examples of Dokka usage. diff --git a/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/build.gradle.kts b/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/build.gradle.kts index b3c42aba..e13819a1 100644 --- a/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/build.gradle.kts +++ b/examples/gradle/dokka-multimodule-example/parentProject/childProjectA/build.gradle.kts @@ -9,10 +9,12 @@ dependencies { implementation(kotlin("stdlib")) } +// configuration specific to this subproject. +// notice the use of Partial task tasks.withType<DokkaTaskPartial>().configureEach { dokkaSourceSets { configureEach { - includes.from("Module.md") + includes.from("ModuleA.md") } } } diff --git a/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/Module.md b/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/ModuleB.md index 27031edf..18a92a33 100644 --- a/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/Module.md +++ b/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/ModuleB.md @@ -1,5 +1,5 @@ # Module childProjectB -This is the child module b +This is the child module B # Package demo This package contains a few examples of Dokka usage. diff --git a/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/build.gradle.kts b/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/build.gradle.kts index b3c42aba..089813a8 100644 --- a/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/build.gradle.kts +++ b/examples/gradle/dokka-multimodule-example/parentProject/childProjectB/build.gradle.kts @@ -9,10 +9,12 @@ dependencies { implementation(kotlin("stdlib")) } +// configuration specific to this subproject. +// notice the use of Partial task tasks.withType<DokkaTaskPartial>().configureEach { dokkaSourceSets { configureEach { - includes.from("Module.md") + includes.from("ModuleB.md") } } } |