Skip to content

Commit

Permalink
Iterate over documentable sourcesets when building custom tags
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnatBeresnev committed Feb 14, 2022
1 parent dc75298 commit b0a5811
Showing 1 changed file with 18 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,13 @@ open class DefaultPageCreator(
val customTags = d.customTags
if (customTags.isNotEmpty()) {
group(styles = setOf(TextStyle.Block)) {
customTags.forEach { (tagName, sourceSetDependent) ->
sourceSetDependent.forEach { (sourceSet, tag) ->
customTagContentProviders.forEach { provider ->
with(provider) {
contentForDescription(sourceSet, tag)
platforms.forEach { platform ->
customTags.forEach { (tagName, sourceSetTag) ->
sourceSetTag[platform]?.let { tag ->
customTagContentProviders.forEach { provider ->
with(provider) {
contentForDescription(platform, tag)
}
}
}
}
Expand Down Expand Up @@ -681,11 +683,17 @@ open class DefaultPageCreator(
}
after(extra = PropertyContainer.empty()) {
contentForBrief(it)
it.customTags.forEach { (tagName, sourceSetDependent) ->
sourceSetDependent.forEach { (sourceSet, tag) ->
customTagContentProviders.forEach { provider ->
with(provider) {
contentForBrief(sourceSet, tag)

val customTags = it.customTags
if (customTags.isNotEmpty()) {
it.sourceSets.forEach { sourceSet ->
customTags.forEach { (tagName, sourceSetTag) ->
sourceSetTag[sourceSet]?.let { tag ->
customTagContentProviders.forEach { provider ->
with(provider) {
contentForDescription(sourceSet, tag)
}
}
}
}
}
Expand Down

0 comments on commit b0a5811

Please sign in to comment.