diff options
Diffstat (limited to 'runners/gradle-plugin')
4 files changed, 9 insertions, 23 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt index 2960ba23..23017917 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleExternalDocumentationLinkBuilder.kt @@ -10,9 +10,8 @@ import org.jetbrains.dokka.ExternalDocumentationLinkImpl import java.net.URL class GradleExternalDocumentationLinkBuilder( - @get:Internal internal val project: Project -) : - DokkaConfigurationBuilder<ExternalDocumentationLinkImpl> { + @Transient @get:Internal internal val project: Project +) : DokkaConfigurationBuilder<ExternalDocumentationLinkImpl> { @Input val url: Property<URL?> = project.objects.safeProperty() diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt index 854dc9a0..ba66ad45 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradlePackageOptionsBuilder.kt @@ -12,7 +12,7 @@ import org.jetbrains.dokka.PackageOptionsImpl class GradlePackageOptionsBuilder( - @get:Internal internal val project: Project + @Transient @get:Internal internal val project: Project ) : DokkaConfigurationBuilder<PackageOptionsImpl> { @Input val prefix: Property<String> = project.objects.safeProperty<String>() diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt index 2cd85c26..54700fe9 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/GradleSourceLinkBuilder.kt @@ -9,7 +9,7 @@ import org.jetbrains.dokka.DokkaConfigurationBuilder import org.jetbrains.dokka.SourceLinkDefinitionImpl class GradleSourceLinkBuilder( - @get:Internal internal val project: Project + @Transient @get:Internal internal val project: Project ) : DokkaConfigurationBuilder<SourceLinkDefinitionImpl> { @Input val path: Property<String> = project.objects.safeProperty<String>() diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt index 5ed0d17f..766f7e55 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/toDokkaSourceSetImpl.kt @@ -1,6 +1,7 @@ package org.jetbrains.dokka.gradle import org.jetbrains.dokka.* +import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink import java.io.File import java.net.URL @@ -44,31 +45,17 @@ private fun GradleDokkaSourceSetBuilder.externalDocumentationLinksWithDefaults() return externalDocumentationLinks.getSafe().build() .run { if (noJdkLink.get()) this - else this + ExternalDocumentationLink( - url = - if (jdkVersion.getSafe() < 11) "https://docs.oracle.com/javase/" + - "${jdkVersion.getSafe()}/docs/api/" - else "https://docs.oracle.com/en/java/javase/" + - "${jdkVersion.getSafe()}/docs/api/java.base/", - packageListUrl = - if (jdkVersion.getSafe() < 11) "https://docs.oracle.com/javase/" + - "${jdkVersion.getSafe()}/docs/api/package-list" - else "https://docs.oracle.com/en/java/javase/" + - "${jdkVersion.getSafe()}/docs/api/element-list" - ) + else this + ExternalDocumentationLink.jdk(jdkVersion.getSafe()) } .run { if (noStdlibLink.getSafe()) this - else this + ExternalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/") + else this + ExternalDocumentationLink.kotlinStdlib() } .run { if (noAndroidSdkLink.getSafe() || !project.isAndroidProject()) this else this + - ExternalDocumentationLink("https://developer.android.com/reference/") + - ExternalDocumentationLink( - url = URL("https://developer.android.com/reference/kotlin/"), - packageListUrl = URL("https://developer.android.com/reference/androidx/package-list") - ) + ExternalDocumentationLink.androidSdk() + + ExternalDocumentationLink.androidX() } .toSet() } |