From e9f5da45c0fcfec5f7c150229301904d7915e090 Mon Sep 17 00:00:00 2001 From: Marcin Aman Date: Wed, 7 Oct 2020 13:58:46 +0200 Subject: Make logo replaceable #1339 (#1488) --- runners/cli/src/main/kotlin/cli/main.kt | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'runners/cli') diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index a1139e65..681ebfa6 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -46,7 +46,7 @@ class GlobalArguments(args: Array) : DokkaConfiguration { override val pluginsConfiguration by parser.option( ArgTypePlugin, description = "Configuration for plugins in format fqPluginName=json^^fqPluginName=json..." - ).default(emptyMap()) + ).delimiter("^^") override val pluginsClasspath by parser.option( ArgTypeFile, @@ -254,16 +254,22 @@ object ArgTypeFile : ArgType(true) { object ArgTypePlatform : ArgType(true) { override fun convert(value: kotlin.String, name: kotlin.String): Platform = Platform.fromString(value) override val description: kotlin.String - get() = "{ String thar represents paltform }" + get() = "{ String that represents platform }" } -object ArgTypePlugin : ArgType>(true) { - override fun convert(value: kotlin.String, name: kotlin.String): Map = - value.split("^^").map { - it.split("=").let { - it[0] to it[1] - } - }.toMap() +object ArgTypePlugin : ArgType(true) { + override fun convert( + value: kotlin.String, + name: kotlin.String + ): DokkaConfiguration.PluginConfiguration { + return value.split("=").let { + PluginConfigurationImpl( + fqPluginName = it[0], + serializationFormat = DokkaConfiguration.SerializationFormat.JSON, + values = it[1] + ) + } + } override val description: kotlin.String get() = "{ String fqName=json, remember to escape `\"` inside json }" -- cgit