diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-07-02 11:45:19 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-07-06 10:28:49 +0200 |
commit | 729362b672c92dc035f81e6f9dcb924829a4bff9 (patch) | |
tree | 561c3612225aa4914d722c011e97f9db138c62c8 | |
parent | 894fba7409dd5a2f306038cf436b878d9d160974 (diff) | |
download | dokka-729362b672c92dc035f81e6f9dcb924829a4bff9.tar.gz dokka-729362b672c92dc035f81e6f9dcb924829a4bff9.tar.bz2 dokka-729362b672c92dc035f81e6f9dcb924829a4bff9.zip |
Replace direct creation of ExternalDocumentationLink with ExternalDocumentationLink.Builder
-rw-r--r-- | runners/cli/src/main/kotlin/cli/main.kt | 3 | ||||
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/runners/cli/src/main/kotlin/cli/main.kt b/runners/cli/src/main/kotlin/cli/main.kt index 37c13442..b0fb45b2 100644 --- a/runners/cli/src/main/kotlin/cli/main.kt +++ b/runners/cli/src/main/kotlin/cli/main.kt @@ -105,6 +105,9 @@ class GlobalArguments(args: Array<String>) : DokkaConfiguration { sourceSets.forEach { it.externalDocumentationLinks.cast<MutableList<ExternalDocumentationLink>>().addAll(defaultLinks(it)) + it.externalDocumentationLinks.cast<MutableList<ExternalDocumentationLink>>().replaceAll { link -> + ExternalDocumentationLink.Builder(link.url, link.packageListUrl).build() + } } } } diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt index c5169ef8..a28416d6 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/configurationImplementations.kt @@ -126,13 +126,13 @@ open class GradleDokkaSourceSet(@Transient val name: String = "") : DokkaSourceS fun externalDocumentationLink(c: Closure<Unit>) { val link = ConfigureUtil.configure(c, GradleExternalDocumentationLinkImpl()) - externalDocumentationLinks.add(link) + externalDocumentationLinks.add(ExternalDocumentationLink.Builder(link.url, link.packageListUrl).build()) } fun externalDocumentationLink(action: Action<in GradleExternalDocumentationLinkImpl>) { val link = GradleExternalDocumentationLinkImpl() action.execute(link) - externalDocumentationLinks.add(link) + externalDocumentationLinks.add(ExternalDocumentationLink.Builder(link.url, link.packageListUrl).build()) } } |