diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-04-29 19:31:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 19:31:57 +0200 |
commit | 6a6017aec8bb502c674b988acb8b993774dd137a (patch) | |
tree | ec70f1977910b45231bd735d0399b0cd66273beb /runners/cli/src/main | |
parent | 34be1adfc7a5a40cf649b0243eefae8b03af49e1 (diff) | |
download | dokka-6a6017aec8bb502c674b988acb8b993774dd137a.tar.gz dokka-6a6017aec8bb502c674b988acb8b993774dd137a.tar.bz2 dokka-6a6017aec8bb502c674b988acb8b993774dd137a.zip |
Make module name optional in cli (#1850)
Diffstat (limited to 'runners/cli/src/main')
-rw-r--r-- | runners/cli/src/main/kotlin/cli/main.kt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index 7c402df5..36edb2d9 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -74,7 +74,7 @@ class GlobalArguments(args: Array<String>) : DokkaConfiguration { description = "Document generated or obvious functions like default `toString` or `equals`" ).default(!DokkaDefaults.suppressObviousFunctions) - override val suppressObviousFunctions: Boolean by lazy{ !noSuppressObviousFunctions } + override val suppressObviousFunctions: Boolean by lazy { !noSuppressObviousFunctions } private val _includes by parser.option( ArgTypeFile, @@ -316,7 +316,13 @@ object ArgTypeSourceLinkDefinition : ArgType<DokkaConfiguration.SourceLinkDefini data class ArgTypeArgument(val moduleName: CLIEntity<kotlin.String>) : ArgType<DokkaConfiguration.DokkaSourceSet>(true) { override fun convert(value: kotlin.String, name: kotlin.String): DokkaConfiguration.DokkaSourceSet = - parseSourceSet(moduleName.value, value.split(" ").filter { it.isNotBlank() }.toTypedArray()) + (if (moduleName.valueOrigin != ArgParser.ValueOrigin.UNSET && moduleName.valueOrigin != ArgParser.ValueOrigin.UNDEFINED) { + moduleName.value + } else { + DokkaDefaults.moduleName + }).let { moduleNameOrDefault -> + parseSourceSet(moduleNameOrDefault, value.split(" ").filter { it.isNotBlank() }.toTypedArray()) + } override val description: kotlin.String get() = "" |