diff options
author | KrystianUjma <kujma@virtuslab.com> | 2019-02-27 17:41:04 +0100 |
---|---|---|
committer | Simon Ogorodnik <Simon.Ogorodnik@jetbrains.com> | 2019-03-11 19:07:22 +0300 |
commit | 7d7e2012e35722c6c0315b2205d708ef5d4341d9 (patch) | |
tree | a8121e7fed01268999be8f8bf3091333277e6787 /runners/ant/src/main | |
parent | 20bd82d30881f8b8439ea49baab923bc04ff1f2e (diff) | |
download | dokka-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.kt | 4 |
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) } |