diff options
author | Marcin Aman <maman@virtuslab.com> | 2020-05-22 18:00:48 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-05-25 10:23:59 +0200 |
commit | b1e3033fca65ac1e8e312e51d2eed4f278ddb076 (patch) | |
tree | 4c8cdad59d103743bf8f25c2364ff0c1ed3f65a0 /plugins/base/src | |
parent | 86adf79963a34302602b45d4b5ef6ef913996176 (diff) | |
download | dokka-b1e3033fca65ac1e8e312e51d2eed4f278ddb076.tar.gz dokka-b1e3033fca65ac1e8e312e51d2eed4f278ddb076.tar.bz2 dokka-b1e3033fca65ac1e8e312e51d2eed4f278ddb076.zip |
SourceSet dependent description for package and module
Diffstat (limited to 'plugins/base/src')
-rw-r--r-- | plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt index 847e9667..7f9a8074 100644 --- a/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt +++ b/plugins/base/src/main/kotlin/translators/documentables/DefaultPageCreator.kt @@ -67,8 +67,10 @@ open class DefaultPageCreator( protected open fun contentForModule(m: DModule) = contentBuilder.contentFor(m) { group(kind = ContentKind.Cover) { header(1, m.name) + sourceSetDependentHint(m.dri, m.sourceSets.toSet(), kind = ContentKind.SourceSetDependantHint){ + +contentForDescription(m) + } } - +contentForDescription(m) +contentForComments(m) block("Packages", 2, ContentKind.Packages, m.packages, m.sourceSets.toSet()) { link(it.name, it.dri) @@ -80,7 +82,9 @@ open class DefaultPageCreator( protected open fun contentForPackage(p: DPackage) = contentBuilder.contentFor(p) { group(kind = ContentKind.Cover) { header(1, "Package ${p.name}") - +contentForDescription(p) + sourceSetDependentHint(p.dri, p.sourceSets.toSet(), kind = ContentKind.SourceSetDependantHint){ + +contentForDescription(p) + } } group(styles = setOf(ContentStyle.TabbedContent)){ +contentForComments(p) @@ -207,7 +211,7 @@ open class DefaultPageCreator( doc.children.asSequence().map { pd to it }.toList() }.groupBy { it.second::class } - val platforms = d.sourceSets + val platforms = d.sourceSets.toSet() return contentBuilder.contentFor(d) { val description = tags.withTypeUnnamed<Description>() |