diff options
author | Andrzej Ratajczak <andrzej.ratajczak98@gmail.com> | 2020-03-13 10:46:33 +0100 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-03-23 13:57:07 +0100 |
commit | c09bde34ff729ef9b1f3bea602fb53cd4e6dca42 (patch) | |
tree | 3a744a16c133b813ab1849761aef1ec3544f401f /runners/cli/src/main/kotlin | |
parent | cedf8b7594deef2cd26e981865daa8aae0155520 (diff) | |
download | dokka-c09bde34ff729ef9b1f3bea602fb53cd4e6dca42.tar.gz dokka-c09bde34ff729ef9b1f3bea602fb53cd4e6dca42.tar.bz2 dokka-c09bde34ff729ef9b1f3bea602fb53cd4e6dca42.zip |
Gradle Task supporting multimodular projects
Diffstat (limited to 'runners/cli/src/main/kotlin')
-rw-r--r-- | runners/cli/src/main/kotlin/cli/main.kt | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index e9329c38..644ecee4 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -52,7 +52,7 @@ open class GlobalArguments(parser: DokkaArgumentsParser) : DokkaConfiguration { listOf("-pass"), "Single dokka pass" ) { - Arguments(parser) + Arguments(parser).also { if(it.moduleName.isEmpty()) DokkaConsoleLogger.warn("Not specified module name. It can result in unexpected behaviour while including documentation for module") } } } @@ -260,14 +260,18 @@ object MainKt { listOf("-globalPackageOptions"), "List of package passConfiguration in format \"prefix,-deprecated,-privateApi,+warnUndocumented,+suppress;...\" " ) { link -> - configuration.passesConfigurations.all { it.perPackageOptions.addAll(parsePerPackageOptions(link)) } + configuration.passesConfigurations.all { + it.perPackageOptions.toMutableList().addAll(parsePerPackageOptions(link)) + } } parseContext.cli.singleAction( listOf("-globalLinks"), "External documentation links in format url^packageListUrl^^url2..." ) { link -> - configuration.passesConfigurations.all { it.externalDocumentationLinks.addAll(parseLinks(link)) } + configuration.passesConfigurations.all { + it.externalDocumentationLinks.toMutableList().addAll(parseLinks(link)) + } } parseContext.cli.repeatingAction( @@ -278,12 +282,14 @@ object MainKt { listOf(SourceLinkDefinitionImpl.parseSourceLinkDefinition(it)) else { if (it.isNotEmpty()) { - println("Warning: Invalid -srcLink syntax. Expected: <path>=<url>[#lineSuffix]. No source links will be generated.") + DokkaConsoleLogger.warn("Invalid -srcLink syntax. Expected: <path>=<url>[#lineSuffix]. No source links will be generated.") } listOf() } - configuration.passesConfigurations.all { it.sourceLinks.addAll(newSourceLinks) } + configuration.passesConfigurations.all { + it.sourceLinks.toMutableList().addAll(newSourceLinks) + } } parser.parseInto(configuration) |