aboutsummaryrefslogtreecommitdiff
path: root/core/src/main
diff options
context:
space:
mode:
authorBłażej Kardyś <bkardys@virtuslab.com>2020-07-27 01:50:52 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-27 09:18:43 +0200
commit28b45f5f230f2b551218a0efd8a6c266f10f2534 (patch)
treebbe21afdf97757a184c085f589c2ebf1403d417e /core/src/main
parent56a09627842a814f57ec193b1a927507c50fdf0d (diff)
downloaddokka-28b45f5f230f2b551218a0efd8a6c266f10f2534.tar.gz
dokka-28b45f5f230f2b551218a0efd8a6c266f10f2534.tar.bz2
dokka-28b45f5f230f2b551218a0efd8a6c266f10f2534.zip
Correct newer javadoc links
Diffstat (limited to 'core/src/main')
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt11
1 files changed, 9 insertions, 2 deletions
diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/core/src/main/kotlin/DokkaBootstrapImpl.kt
index fabbc889..a2efab41 100644
--- a/core/src/main/kotlin/DokkaBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaBootstrapImpl.kt
@@ -74,10 +74,17 @@ class DokkaBootstrapImpl : DokkaBootstrap {
fun defaultLinks(config: DokkaSourceSetImpl): List<ExternalDocumentationLinkImpl> {
val links = mutableListOf<ExternalDocumentationLinkImpl>()
- if (!config.noJdkLink)
+ if (!config.noJdkLink) {
+ val javadocLink =
+ if (config.jdkVersion < 11) "https://docs.oracle.com/javase/${config.jdkVersion}/docs/api/"
+ else "https://docs.oracle.com/en/java/javase/${config.jdkVersion}/docs/api/java.base/"
+ val packageListLink =
+ if (config.jdkVersion < 11) "${javadocLink}/package-list"
+ else "https://docs.oracle.com/en/java/javase/${config.jdkVersion}/docs/api/element-list"
links += DokkaConfiguration.ExternalDocumentationLink
- .Builder("https://docs.oracle.com/javase/${config.jdkVersion}/docs/api/")
+ .Builder(javadocLink, packageListLink)
.build() as ExternalDocumentationLinkImpl
+ }
if (!config.noStdlibLink)
links += DokkaConfiguration.ExternalDocumentationLink