diff options
author | Ignat Beresnev <ignat.beresnev@jetbrains.com> | 2023-02-20 21:45:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 21:45:48 +0100 |
commit | fa22175d91fd63b833c537990b79569fa3e2f97d (patch) | |
tree | 9d18b5522d34f85286ff787e150c4f533bbfedd3 /core/src/main/kotlin/configuration.kt | |
parent | dbff38bacb25fc3021bbdd67ac25762bc0b0d30f (diff) | |
download | dokka-fa22175d91fd63b833c537990b79569fa3e2f97d.tar.gz dokka-fa22175d91fd63b833c537990b79569fa3e2f97d.tar.bz2 dokka-fa22175d91fd63b833c537990b79569fa3e2f97d.zip |
Add the ability to pretty print DokkaConfiguration (#2872)
Diffstat (limited to 'core/src/main/kotlin/configuration.kt')
-rw-r--r-- | core/src/main/kotlin/configuration.kt | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt index 71356e67..9bb81318 100644 --- a/core/src/main/kotlin/configuration.kt +++ b/core/src/main/kotlin/configuration.kt @@ -2,10 +2,7 @@ package org.jetbrains.dokka -import org.jetbrains.dokka.plugability.ConfigurableBlock import org.jetbrains.dokka.utilities.cast -import org.jetbrains.dokka.utilities.parseJson -import org.jetbrains.dokka.utilities.toJsonString import java.io.File import java.io.Serializable import java.net.URL @@ -95,8 +92,6 @@ data class DokkaSourceSetID( } } -fun DokkaConfigurationImpl(json: String): DokkaConfigurationImpl = parseJson(json) - /** * Global options can be configured and applied to all packages and modules at once, overwriting package configuration. * @@ -111,8 +106,6 @@ data class GlobalDokkaConfiguration( val sourceLinks: List<SourceLinkDefinitionImpl>? ) -fun GlobalDokkaConfiguration(json: String): GlobalDokkaConfiguration = parseJson(json) - fun DokkaConfiguration.apply(globals: GlobalDokkaConfiguration): DokkaConfiguration = this.apply { sourceSets.forEach { it.perPackageOptions.cast<MutableList<DokkaConfiguration.PackageOptions>>().addAll(globals.perPackageOptions ?: emptyList()) @@ -127,9 +120,6 @@ fun DokkaConfiguration.apply(globals: GlobalDokkaConfiguration): DokkaConfigurat } } -fun DokkaConfiguration.toJsonString(): String = toJsonString(this) -fun <T : ConfigurableBlock> T.toJsonString(): String = toJsonString(this) - interface DokkaConfiguration : Serializable { val moduleName: String val moduleVersion: String? |