aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/src/main/kotlin/Utilities/Links.kt18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Utilities/Links.kt b/core/src/main/kotlin/Utilities/Links.kt
new file mode 100644
index 00000000..34423e4e
--- /dev/null
+++ b/core/src/main/kotlin/Utilities/Links.kt
@@ -0,0 +1,18 @@
+package org.jetbrains.dokka.Utilities
+
+import org.jetbrains.dokka.DokkaConfiguration
+import org.jetbrains.dokka.ExternalDocumentationLinkImpl
+
+fun DokkaConfiguration.PassConfiguration.defaultLinks(): List<ExternalDocumentationLinkImpl> {
+ val links = mutableListOf<ExternalDocumentationLinkImpl>()
+ if (!noJdkLink)
+ links += DokkaConfiguration.ExternalDocumentationLink
+ .Builder("https://docs.oracle.com/javase/${jdkVersion}/docs/api/")
+ .build() as ExternalDocumentationLinkImpl
+
+ if (!noStdlibLink)
+ links += DokkaConfiguration.ExternalDocumentationLink
+ .Builder("https://kotlinlang.org/api/latest/jvm/stdlib/")
+ .build() as ExternalDocumentationLinkImpl
+ return links
+}