aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/DokkaBootstrapImpl.kt
diff options
context:
space:
mode:
authorDmitry Jemerov <yole@jetbrains.com>2017-02-23 15:21:03 +0100
committerDmitry Jemerov <yole@jetbrains.com>2017-02-23 15:21:03 +0100
commita39c7a161282d132d08bcf89eed0213374a574e9 (patch)
tree973c36ded09cfd3a92b1fbfef947503b5ee71afe /core/src/main/kotlin/DokkaBootstrapImpl.kt
parent287c8207f6c7534ac9c5dfbc6e2ce10fae9a696b (diff)
downloaddokka-a39c7a161282d132d08bcf89eed0213374a574e9.tar.gz
dokka-a39c7a161282d132d08bcf89eed0213374a574e9.tar.bz2
dokka-a39c7a161282d132d08bcf89eed0213374a574e9.zip
Allow specifying implicit platforms for each source root
Diffstat (limited to 'core/src/main/kotlin/DokkaBootstrapImpl.kt')
-rw-r--r--core/src/main/kotlin/DokkaBootstrapImpl.kt7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/main/kotlin/DokkaBootstrapImpl.kt b/core/src/main/kotlin/DokkaBootstrapImpl.kt
index eb2b2a65..59139263 100644
--- a/core/src/main/kotlin/DokkaBootstrapImpl.kt
+++ b/core/src/main/kotlin/DokkaBootstrapImpl.kt
@@ -10,6 +10,11 @@ fun parseSourceLinkDefinition(srcLink: String): SourceLinkDefinition {
urlAndLine.substringAfter("#", "").let { if (it.isEmpty()) null else "#" + it })
}
+fun parseSourceRoot(sourceRoot: String): SourceRoot {
+ val components = sourceRoot.split("::", limit = 2)
+ return SourceRoot(components.first(), components.getOrNull(1)?.split(',').orEmpty())
+}
+
class DokkaBootstrapImpl : DokkaBootstrap {
class DokkaProxyLogger(val consumer: BiConsumer<String, String>) : DokkaLogger {
@@ -46,7 +51,7 @@ class DokkaBootstrapImpl : DokkaBootstrap {
generator = DokkaGenerator(
DokkaProxyLogger(logger),
classpath,
- sources,
+ sources.map(::parseSourceRoot),
samples,
includes,
moduleName,