@@ -8,6 +8,7 @@ import io.kotest.assertions.withClue
8
8
import io.kotest.matchers.sequences.shouldBeEmpty
9
9
import io.kotest.matchers.shouldBe
10
10
import io.kotest.matchers.string.shouldContain
11
+ import kotlinx.serialization.json.Json
11
12
import org.gradle.testkit.runner.TaskOutcome.*
12
13
import org.jetbrains.dokka.gradle.utils.*
13
14
import org.jetbrains.dokka.gradle.utils.addArguments
@@ -31,7 +32,6 @@ class KotlinMultiplatformIT {
31
32
project.runner
32
33
.addArguments(
33
34
" :dokkaGenerate" ,
34
- " --rerun-tasks" , // TODO remove before merging
35
35
)
36
36
.build {
37
37
withClue(" expect project builds successfully" ) {
@@ -43,23 +43,22 @@ class KotlinMultiplatformIT {
43
43
val expectedHtml = project.projectDir.resolve(" expectedData/html" )
44
44
val actualHtmlDir = project.projectDir.resolve(" build/dokka/html" )
45
45
46
- val dokkaConfigurationJsons = project
47
- .findFiles { it.name == " dokka-configuration.json" }
48
- .joinToString(" \n\n " ) {
49
- """
50
- ---
51
- ${it.invariantSeparatorsPathString}
52
- ${it.readText()}
53
- ---
54
- """ .trimIndent()
55
- }
46
+ val dokkaConfigurationJsonFiles = project.findFiles { it.name == " dokka-configuration.json" }
47
+ val dokkaConfigContent = dokkaConfigurationJsonFiles.joinToString(" \n\n " ) { dcFile ->
48
+ // re-encode the JSON to a compact format, to prevent the log output being completely spammed
49
+ val compactJson = Json .parseToJsonElement(dcFile.readText())
50
+ """
51
+ - ${dcFile.invariantSeparatorsPathString}
52
+ $compactJson
53
+ """ .trimIndent()
54
+ }
56
55
57
56
withClue(
58
57
"""
59
58
|expectedHtml: ${expectedHtml.toUri()}
60
59
|actualHtmlDir: ${actualHtmlDir.toUri()}
61
- |dokkaConfigurationJsons:
62
- |$dokkaConfigurationJsons
60
+ |dokkaConfigurationJsons [ ${dokkaConfigurationJsonFiles.count()} ] :
61
+ |$dokkaConfigContent
63
62
""" .trimMargin()
64
63
) {
65
64
val expectedFileTree = expectedHtml.toTreeString()
0 commit comments