From 9c4eec0e319ec7a2c112865e67a6ff8b7c0d5e01 Mon Sep 17 00:00:00 2001 From: nikpachoo Date: Wed, 3 Aug 2022 13:04:25 +0200 Subject: [PATCH] ktl-695 chore: support Dokka HTML customization --- build.gradle | 4 ++++ dokka-templates/README.md | 4 ++++ gradle/dokka.gradle.kts | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 dokka-templates/README.md diff --git a/build.gradle b/build.gradle index 4d6af16570..ba6d5c18cb 100644 --- a/build.gradle +++ b/build.gradle @@ -355,3 +355,7 @@ allprojects { subProject -> } } } + +tasks.named("dokkaHtmlMultiModule") { + pluginsMapConfiguration.set(["org.jetbrains.dokka.base.DokkaBase": """{ "templatesDir": "${projectDir.toString().replace('\\', '/')}/dokka-templates" }"""]) +} diff --git a/dokka-templates/README.md b/dokka-templates/README.md new file mode 100644 index 0000000000..0891177785 --- /dev/null +++ b/dokka-templates/README.md @@ -0,0 +1,4 @@ +# Customize Dokka's HTML. +To customize Dokka's HTML output, place a file in this folder. +Dokka will find a template file there. If the file is not found, a default one will be used. +This folder is defined by the templatesDir property. \ No newline at end of file diff --git a/gradle/dokka.gradle.kts b/gradle/dokka.gradle.kts index 2470ded3ea..ba6956aa83 100644 --- a/gradle/dokka.gradle.kts +++ b/gradle/dokka.gradle.kts @@ -27,6 +27,8 @@ tasks.withType(DokkaTaskPartial::class).configureEach { tasks.withType(DokkaTaskPartial::class).configureEach { suppressInheritedMembers.set(true) + pluginsMapConfiguration.set(mapOf("org.jetbrains.dokka.base.DokkaBase" to """{ "templatesDir" : "${rootProject.projectDir.toString().replace('\\', '/')}/dokka-templates" }""")) + dokkaSourceSets.configureEach { jdkVersion.set(11) includes.from("README.md")