aboutsummaryrefslogtreecommitdiff
path: root/runners
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-02-20 21:45:48 +0100
committerGitHub <noreply@github.com>2023-02-20 21:45:48 +0100
commitfa22175d91fd63b833c537990b79569fa3e2f97d (patch)
tree9d18b5522d34f85286ff787e150c4f533bbfedd3 /runners
parentdbff38bacb25fc3021bbdd67ac25762bc0b0d30f (diff)
downloaddokka-fa22175d91fd63b833c537990b79569fa3e2f97d.tar.gz
dokka-fa22175d91fd63b833c537990b79569fa3e2f97d.tar.bz2
dokka-fa22175d91fd63b833c537990b79569fa3e2f97d.zip
Add the ability to pretty print DokkaConfiguration (#2872)
Diffstat (limited to 'runners')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt4
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt7
-rw-r--r--runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt1
3 files changed, 4 insertions, 8 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
index dbd86fac..d7ddfc93 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
@@ -182,7 +182,7 @@ abstract class AbstractDokkaTask : DefaultTask() {
val pluginConfiguration = PluginConfigurationImpl(
fqPluginName = P::class.qualifiedName!!,
serializationFormat = DokkaConfiguration.SerializationFormat.JSON,
- values = instance.toJsonString()
+ values = instance.toCompactJsonString()
)
pluginsConfiguration.add(pluginConfiguration)
}
@@ -200,7 +200,7 @@ abstract class AbstractDokkaTask : DefaultTask() {
@TaskAction
internal open fun generateDocumentation() {
DokkaBootstrap(runtime, DokkaBootstrapImpl::class).apply {
- configure(buildDokkaConfiguration().toJsonString(), createProxyLogger())
+ configure(buildDokkaConfiguration().toCompactJsonString(), createProxyLogger())
/**
* Run in a new thread to avoid memory leaks that are related to ThreadLocal (that keeps `URLCLassLoader`)
* Currently, all `ThreadLocal`s leaking are in the compiler/IDE codebase.
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt
index a598284f..64aa1334 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt
@@ -2,10 +2,7 @@ package org.jetbrains.dokka.gradle
import org.gradle.kotlin.dsl.withType
import org.gradle.testfixtures.ProjectBuilder
-import org.jetbrains.dokka.DokkaConfiguration
-import org.jetbrains.dokka.DokkaConfigurationImpl
-import org.jetbrains.dokka.PluginConfigurationImpl
-import org.jetbrains.dokka.toJsonString
+import org.jetbrains.dokka.*
import java.io.File
import java.net.URL
import kotlin.test.Test
@@ -50,7 +47,7 @@ class DokkaConfigurationJsonTest {
}
val sourceConfiguration = dokkaTask.buildDokkaConfiguration()
- val configurationJson = sourceConfiguration.toJsonString()
+ val configurationJson = sourceConfiguration.toCompactJsonString()
val parsedConfiguration = DokkaConfigurationImpl(configurationJson)
assertEquals(sourceConfiguration, parsedConfiguration)
diff --git a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt
index 3ef1ed74..ac8f040e 100644
--- a/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt
+++ b/runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt
@@ -4,7 +4,6 @@ import org.gradle.kotlin.dsl.withType
import org.gradle.testfixtures.ProjectBuilder
import org.jetbrains.dokka.DokkaConfiguration
import org.jetbrains.dokka.PluginConfigurationImpl
-import org.jetbrains.dokka.toJsonString
import org.junit.Rule
import org.junit.rules.TemporaryFolder
import java.io.File