aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--runners/cli/src/main/kotlin/cli/main.kt15
1 files changed, 6 insertions, 9 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt
index 731b09d9..50aadf00 100644
--- a/runners/cli/src/main/kotlin/cli/main.kt
+++ b/runners/cli/src/main/kotlin/cli/main.kt
@@ -192,18 +192,17 @@ class Arguments(val parser: DokkaArgumentsParser) : DokkaConfiguration.PassConfi
}
object MainKt {
- fun defaultLinks(config: DokkaConfiguration.PassConfiguration): List<ExternalDocumentationLink> {
- val links = mutableListOf<ExternalDocumentationLinkImpl>()
+ fun defaultLinks(config: DokkaConfiguration.PassConfiguration): MutableList<ExternalDocumentationLink> =
+ mutableListOf<ExternalDocumentationLink>().apply {
if (!config.noJdkLink)
- links += DokkaConfiguration.ExternalDocumentationLink
+ this += DokkaConfiguration.ExternalDocumentationLink
.Builder("https://docs.oracle.com/javase/${config.jdkVersion}/docs/api/")
- .build() as ExternalDocumentationLinkImpl
+ .build()
if (!config.noStdlibLink)
- links += DokkaConfiguration.ExternalDocumentationLink
+ this += DokkaConfiguration.ExternalDocumentationLink
.Builder("https://kotlinlang.org/api/latest/jvm/stdlib/")
- .build() as ExternalDocumentationLinkImpl
- return links
+ .build()
}
fun parseLinks(links: String): List<ExternalDocumentationLink> {
@@ -212,7 +211,6 @@ object MainKt {
.filter { it.isNotEmpty() }
.partition { it.size == 1 }
-
return parsedLinks.map { (root) -> ExternalDocumentationLink.Builder(root).build() } +
parsedOfflineLinks.map { (root, packageList) ->
val rootUrl = URL(root)
@@ -271,7 +269,6 @@ object MainKt {
val parser = DokkaArgumentsParser(args, parseContext)
val configuration = GlobalArguments(parser)
-
parseContext.cli.singleAction(
listOf("-globalPackageOptions"),
"List of package passConfiguration in format \"prefix,-deprecated,-privateApi,+warnUndocumented,+suppress;...\" "