diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2020-06-12 11:35:42 +0200 |
---|---|---|
committer | Paweł Marks <Kordyjan@users.noreply.github.com> | 2020-06-15 13:15:30 +0200 |
commit | c804fab6e15ce7974453388afbdeed1cae33ea83 (patch) | |
tree | ee30c19c7550c1e3b0ad923980c90eba9f2b4259 /plugins/base/src/main/kotlin/transformers/documentables | |
parent | 18d46c118174e0aea8d917b977ff7e8461e0e8c4 (diff) | |
download | dokka-c804fab6e15ce7974453388afbdeed1cae33ea83.tar.gz dokka-c804fab6e15ce7974453388afbdeed1cae33ea83.tar.bz2 dokka-c804fab6e15ce7974453388afbdeed1cae33ea83.zip |
Make module name a part of sourceSetID be default
Diffstat (limited to 'plugins/base/src/main/kotlin/transformers/documentables')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt index 4aa7632e..d33b41bf 100644 --- a/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/documentables/ReportUndocumentedTransformer.kt @@ -77,7 +77,7 @@ internal class ReportUndocumentedTransformer : DocumentableTransformer { append("/") } - val sourceSetName = sourceSet.sourceSetName + val sourceSetName = sourceSet.displayName if (sourceSetName != null.toString()) { append(" ($sourceSetName)") } @@ -91,7 +91,7 @@ internal class ReportUndocumentedTransformer : DocumentableTransformer { private fun isUndocumented(documentable: Documentable, sourceSet: SourceSetData): Boolean { fun resolveDependentSourceSets(sourceSet: SourceSetData): List<SourceSetData> { return sourceSet.dependentSourceSets.map { sourceSetName -> - documentable.sourceSets.single { it.sourceSetName == sourceSetName } + documentable.sourceSets.single { it.sourceSetID == sourceSetName } } } @@ -111,11 +111,12 @@ internal class ReportUndocumentedTransformer : DocumentableTransformer { } private fun passConfiguration(context: DokkaContext, sourceSet: SourceSetData): PassConfiguration { - return context.configuration.passesConfigurations.single { configuration -> - // TODO: Use sourceSetID after gradle-rewrite - configuration.sourceSetName == sourceSet.sourceSetName && - configuration.analysisPlatform == sourceSet.platform + val passes = context.configuration.passesConfigurations.filter { configuration -> + configuration.sourceSetID == sourceSet.sourceSetID } + if (passes.size > 1) + context.logger.error("Expected one passConfiguration with ID: ${sourceSet.sourceSetID} found: ${passes.size}") + return passes.first() } private fun isFakeOverride(documentable: Documentable, sourceSet: SourceSetData): Boolean { |