aboutsummaryrefslogtreecommitdiff
path: root/integration/src
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-05-11 16:31:04 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2017-05-11 19:54:45 +0300
commit0e8733ead6d5c4c6db7e4fe8a1f34b7598823290 (patch)
treec3229a24b1dcab6b0a66dfe65283c041936719b1 /integration/src
parenta86c859eba6154524f3b42461aad6b45f26e3650 (diff)
downloaddokka-0e8733ead6d5c4c6db7e4fe8a1f34b7598823290.tar.gz
dokka-0e8733ead6d5c4c6db7e4fe8a1f34b7598823290.tar.bz2
dokka-0e8733ead6d5c4c6db7e4fe8a1f34b7598823290.zip
Add external documentation links argument to gradle, maven, ant
Diffstat (limited to 'integration/src')
-rw-r--r--integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt22
1 files changed, 21 insertions, 1 deletions
diff --git a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt
index 7f16b1a5..ca6f0bc4 100644
--- a/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt
+++ b/integration/src/main/kotlin/org/jetbrains/dokka/configuration.kt
@@ -21,6 +21,7 @@ interface DokkaConfiguration {
val sourceLinks: List<SourceLinkDefinition>
val impliedPlatforms: List<String>
val perPackageOptions: List<PackageOptions>
+ val externalDocumentationLinks: List<DokkaConfiguration.ExternalDocumentationLink>
interface SourceRoot {
val path: String
@@ -43,6 +44,20 @@ interface DokkaConfiguration {
interface ExternalDocumentationLink {
val url: URL
val packageListUrl: URL
+
+ open class Builder(open var url: URL? = null,
+ open var packageListUrl: URL? = null) {
+
+ constructor(root: String) : this(URL(root), null)
+
+ fun build(): DokkaConfiguration.ExternalDocumentationLink =
+ if (packageListUrl != null && url != null)
+ ExternalDocumentationLinkImpl(url!!, packageListUrl!!)
+ else if (url != null)
+ ExternalDocumentationLinkImpl(url!!, URL(url!!, "package-list"))
+ else
+ throw IllegalArgumentException("url or url && packageListUrl must not be null for external documentation link")
+ }
}
}
@@ -62,4 +77,9 @@ data class SerializeOnlyDokkaConfiguration(override val moduleName: String,
override val generateIndexPages: Boolean,
override val sourceLinks: List<DokkaConfiguration.SourceLinkDefinition>,
override val impliedPlatforms: List<String>,
- override val perPackageOptions: List<DokkaConfiguration.PackageOptions>) : DokkaConfiguration
+ override val perPackageOptions: List<DokkaConfiguration.PackageOptions>,
+ override val externalDocumentationLinks: List<DokkaConfiguration.ExternalDocumentationLink>) : DokkaConfiguration
+
+
+data class ExternalDocumentationLinkImpl internal constructor(override val url: URL,
+ override val packageListUrl: URL) : DokkaConfiguration.ExternalDocumentationLink \ No newline at end of file