blob: 01eefb3967338933b67f8339ee9375a88f126300 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package org.jetbrains.dokka
import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink
import java.net.URL
fun ExternalDocumentationLink.Companion.jdk(jdkVersion: Int): ExternalDocumentationLinkImpl =
ExternalDocumentationLink(
url =
if (jdkVersion < 11) "https://docs.oracle.com/javase/${jdkVersion}/docs/api/"
else "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/java.base/",
packageListUrl =
if (jdkVersion < 11) "https://docs.oracle.com/javase/${jdkVersion}/docs/api/package-list"
else "https://docs.oracle.com/en/java/javase/${jdkVersion}/docs/api/element-list"
)
fun ExternalDocumentationLink.Companion.kotlinStdlib(): ExternalDocumentationLinkImpl =
ExternalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
fun ExternalDocumentationLink.Companion.androidSdk(): ExternalDocumentationLinkImpl =
ExternalDocumentationLink("https://developer.android.com/reference/")
fun ExternalDocumentationLink.Companion.androidX(): ExternalDocumentationLinkImpl = ExternalDocumentationLink(
url = URL("https://developer.android.com/reference/kotlin/"),
packageListUrl = URL("https://developer.android.com/reference/androidx/package-list")
)
|