File tree Expand file tree Collapse file tree 1 file changed +8
-14
lines changed
Expand file tree Collapse file tree 1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change 1+ import org.gradle.api.tasks.Copy
2+
13plugins {
24 base
35 alias(libs.plugins.dokka) apply false
@@ -62,23 +64,15 @@ tasks.register("publishRecorderModulesToMavenLocal") {
6264 dependsOn(publishableModules.map { " $it :publishToMavenLocal" })
6365}
6466
65- tasks.register(" dokkaPublicApi" ) {
67+ tasks.register< Copy > (" dokkaPublicApi" ) {
6668 group = " documentation"
6769 description = " Generates Dokka HTML docs for published recorder modules"
6870 dependsOn(publishableModules.map { " $it :dokkaGeneratePublicationHtml" })
69- outputs.dir(layout.buildDirectory.dir(" dokka/public-api" ))
70- doLast {
71- val outputRoot = layout.buildDirectory.dir(" dokka/public-api" ).get().asFile
72- outputRoot.mkdirs()
73- publishableModules.forEach { modulePath ->
74- val moduleName = modulePath.removePrefix(" :" )
75- val moduleDocsDir = project(modulePath).layout.buildDirectory.dir(" dokka/html" ).get().asFile
76- if (moduleDocsDir.exists()) {
77- copy {
78- from(moduleDocsDir)
79- into(outputRoot.resolve(moduleName))
80- }
81- }
71+ into(layout.buildDirectory.dir(" dokka/public-api" ))
72+ publishableModules.forEach { modulePath ->
73+ val moduleName = modulePath.removePrefix(" :" )
74+ from(project(modulePath).layout.buildDirectory.dir(" dokka/html" )) {
75+ into(moduleName)
8276 }
8377 }
8478}
You can’t perform that action at this time.
0 commit comments