Skip to content

Commit aa1b22d

Browse files
committed
configureEach for Dokka tasks
1 parent 66d6ce5 commit aa1b22d

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.buildscript/prepare_mkdocs.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
set -ex
1010

1111
# Generate the API docs
12-
./gradlew dokkaHtml
12+
./gradlew dokkaHtmlPartial
1313

1414
# Copy in special files that GitHub wants in the project root.
1515
cp CHANGELOG.md docs/changelog.md

build-support/src/main/kotlin/com/squareup/wire/buildsupport/WireBuildPlugin.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED
3838
import org.gradle.kotlin.dsl.attributes
3939
import org.gradle.kotlin.dsl.get
4040
import org.gradle.kotlin.dsl.withType
41-
import org.jetbrains.dokka.gradle.DokkaTask
41+
import org.jetbrains.dokka.gradle.DokkaTaskPartial
4242
import org.jetbrains.kotlin.gradle.dsl.KotlinCompile
4343
import org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension
4444
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
@@ -357,7 +357,7 @@ private class WireBuildExtensionImpl(private val project: Project) : WireBuildEx
357357

358358
if (project.isWireBom) return
359359

360-
project.tasks.withType(DokkaTask::class.java) {
360+
project.tasks.withType(DokkaTaskPartial::class.java).configureEach {
361361
outputDirectory.set(project.file("${project.rootDir}/docs/3.x/${project.name}"))
362362
dokkaSourceSets.configureEach {
363363
reportUndocumented.set(false)
@@ -367,7 +367,8 @@ private class WireBuildExtensionImpl(private val project: Project) : WireBuildEx
367367
matchingRegex.set("com\\.squareup\\.wire.*\\.internal.*")
368368
suppress.set(true)
369369
}
370-
suppressGeneratedFiles.set(false) // document generated code
370+
// Document generated code.
371+
suppressGeneratedFiles.set(false)
371372
}
372373
}
373374

0 commit comments

Comments
 (0)