Skip to content

Commit 3383f32

Browse files
whyolegzoobestik
authored andcommitted
Fix dokka templates (#399)
* Apply `kotlinx-io-dokka` in root * Share configuration for partial and multi-module via AbstractDokkaTask
1 parent 1dae118 commit 3383f32

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-dokka.gradle.kts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,24 @@
33
* Use of this source code is governed by the Apache 2.0 license that can be found in the LICENCE file.
44
*/
55

6-
import org.jetbrains.dokka.gradle.DokkaTaskPartial
6+
import org.jetbrains.dokka.gradle.*
77
import java.net.URL
88

99
plugins {
1010
id("org.jetbrains.dokka")
1111
}
1212

13+
// shared configuration for all dokka tasks (both partial and multi-module)
14+
tasks.withType<AbstractDokkaTask>().configureEach {
15+
pluginsMapConfiguration.set(
16+
mapOf(
17+
"org.jetbrains.dokka.base.DokkaBase" to """{ "templatesDir" : "${
18+
rootDir.resolve("dokka-templates")
19+
}"""
20+
)
21+
)
22+
}
23+
1324
tasks.withType<DokkaTaskPartial>().configureEach {
1425
dokkaSourceSets.configureEach {
1526
includes.from("Module.md")

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ import kotlinx.validation.ExperimentalBCVApi
88

99
plugins {
1010
id("kotlinx-io-publish") apply false
11+
id("kotlinx-io-dokka")
1112

1213
alias(libs.plugins.kover)
1314
alias(libs.plugins.bcv)
14-
alias(libs.plugins.dokka)
1515
}
1616

1717
allprojects {

0 commit comments

Comments
 (0)