diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/kotlin/configuration.kt | 8 | ||||
-rw-r--r-- | core/src/main/kotlin/defaultConfiguration.kt | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/core/src/main/kotlin/configuration.kt b/core/src/main/kotlin/configuration.kt index a82551a1..bdb493b8 100644 --- a/core/src/main/kotlin/configuration.kt +++ b/core/src/main/kotlin/configuration.kt @@ -5,6 +5,7 @@ package org.jetbrains.dokka import kotlinx.serialization.Serializable import kotlinx.serialization.UnstableDefault import kotlinx.serialization.json.Json +import kotlinx.serialization.json.JsonConfiguration import java.io.File import java.net.URL @@ -26,7 +27,7 @@ object DokkaDefaults { val analysisPlatform: Platform = Platform.DEFAULT const val suppress: Boolean = false - const val displayName = "JVM" + const val sourceSetDisplayName = "JVM" const val sourceSetName = "main" } @@ -62,8 +63,9 @@ data class DokkaSourceSetID( } @OptIn(UnstableDefault::class) -fun DokkaConfigurationImpl(json: String): DokkaConfigurationImpl { - return Json.parse(DokkaConfigurationImpl.serializer(), json) +fun DokkaConfigurationImpl(input: String): DokkaConfigurationImpl { + val json = Json(JsonConfiguration.Default.copy(ignoreUnknownKeys = true)) + return json.parse(DokkaConfigurationImpl.serializer(), input) } interface DokkaConfiguration { diff --git a/core/src/main/kotlin/defaultConfiguration.kt b/core/src/main/kotlin/defaultConfiguration.kt index fde0bd6a..4730bab4 100644 --- a/core/src/main/kotlin/defaultConfiguration.kt +++ b/core/src/main/kotlin/defaultConfiguration.kt @@ -20,7 +20,7 @@ data class DokkaConfigurationImpl( @Serializable data class DokkaSourceSetImpl( override val moduleDisplayName: String, - override val displayName: String = DokkaDefaults.displayName, + override val displayName: String = DokkaDefaults.sourceSetDisplayName, override val sourceSetID: DokkaSourceSetID, override val classpath: List<String> = emptyList(), override val sourceRoots: List<SourceRootImpl>, |