diff options
author | Alex Saveau <asaveau@google.com> | 2020-07-15 17:08:38 +0000 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-07-20 12:02:45 +0200 |
commit | e7b50c6ba2102fc9a59a460172aa7a4d82ad08df (patch) | |
tree | 210ce6f1c1b8a253fcbf5920eebc18168965b640 /core | |
parent | 0b35364e7bbe7c7365622f316a8c89ad204f74ce (diff) | |
download | dokka-e7b50c6ba2102fc9a59a460172aa7a4d82ad08df.tar.gz dokka-e7b50c6ba2102fc9a59a460172aa7a4d82ad08df.tar.bz2 dokka-e7b50c6ba2102fc9a59a460172aa7a4d82ad08df.zip |
Address review comments and fix integration tests
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>, |