aboutsummaryrefslogtreecommitdiff
path: root/runners/ant
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 /runners/ant
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 'runners/ant')
-rw-r--r--runners/ant/src/main/kotlin/ant/dokka.kt8
1 files changed, 7 insertions, 1 deletions
diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt
index f645aea4..83d7e8ac 100644
--- a/runners/ant/src/main/kotlin/ant/dokka.kt
+++ b/runners/ant/src/main/kotlin/ant/dokka.kt
@@ -6,6 +6,7 @@ import org.apache.tools.ant.Task
import org.apache.tools.ant.types.Path
import org.apache.tools.ant.types.Reference
import org.jetbrains.dokka.*
+import org.jetbrains.dokka.DokkaConfiguration.ExternalDocumentationLink
import java.io.File
class AntLogger(val task: Task): DokkaLogger {
@@ -47,6 +48,7 @@ class DokkaAntTask: Task() {
val antSourceLinks: MutableList<AntSourceLinkDefinition> = arrayListOf()
val antSourceRoots: MutableList<AntSourceRoot> = arrayListOf()
val antPackageOptions: MutableList<AntPackageOptions> = arrayListOf()
+ val antExternalDocumentationLinks = mutableListOf<ExternalDocumentationLink.Builder>()
fun setClasspath(classpath: Path) {
compileClasspath.append(classpath)
@@ -86,6 +88,8 @@ class DokkaAntTask: Task() {
fun createPackageOptions(): AntPackageOptions = AntPackageOptions().apply { antPackageOptions.add(this) }
+ fun createExternalDocumentationLink() = ExternalDocumentationLink.Builder().apply { antExternalDocumentationLinks.add(this) }
+
override fun execute() {
if (sourcePath.list().isEmpty() && antSourceRoots.isEmpty()) {
throw BuildException("At least one source path needs to be specified")
@@ -114,7 +118,9 @@ class DokkaAntTask: Task() {
sourceLinks = sourceLinks,
jdkVersion = jdkVersion,
impliedPlatforms = impliedPlatforms.split(','),
- perPackageOptions = antPackageOptions)
+ perPackageOptions = antPackageOptions,
+ externalDocumentationLinks = antExternalDocumentationLinks.map { it.build() }
+ )
)
generator.generate()
}