aboutsummaryrefslogtreecommitdiff
path: root/runners/ant/src/main
diff options
context:
space:
mode:
authorKrystianUjma <kujma@virtuslab.com>2019-02-27 17:41:04 +0100
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2019-03-11 19:07:22 +0300
commit7d7e2012e35722c6c0315b2205d708ef5d4341d9 (patch)
treea8121e7fed01268999be8f8bf3091333277e6787 /runners/ant/src/main
parent20bd82d30881f8b8439ea49baab923bc04ff1f2e (diff)
downloaddokka-7d7e2012e35722c6c0315b2205d708ef5d4341d9.tar.gz
dokka-7d7e2012e35722c6c0315b2205d708ef5d4341d9.tar.bz2
dokka-7d7e2012e35722c6c0315b2205d708ef5d4341d9.zip
Fix test, prohibit non-unix path style for dir property
Update readme.md, allow only unix based path (dir property)
Diffstat (limited to 'runners/ant/src/main')
-rw-r--r--runners/ant/src/main/kotlin/ant/dokka.kt4
1 files changed, 4 insertions, 0 deletions
diff --git a/runners/ant/src/main/kotlin/ant/dokka.kt b/runners/ant/src/main/kotlin/ant/dokka.kt
index 79583a1f..b23328e0 100644
--- a/runners/ant/src/main/kotlin/ant/dokka.kt
+++ b/runners/ant/src/main/kotlin/ant/dokka.kt
@@ -111,6 +111,10 @@ class DokkaAntTask: Task() {
}
val sourceLinks = antSourceLinks.map {
val path = it.path ?: throw BuildException("'path' attribute of a <sourceLink> element is required")
+ if (path.contains("\\")) {
+ throw BuildException("'dir' attribute of a <sourceLink> - incorrect value, only Unix based path allowed.")
+ }
+
val url = it.url ?: throw BuildException("'url' attribute of a <sourceLink> element is required")
SourceLinkDefinitionImpl(File(path).canonicalFile.absolutePath, url, it.lineSuffix)
}