aboutsummaryrefslogtreecommitdiff
path: root/runners
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-05-15 11:28:59 +0200
committerKamil Doległo <kamilok1965@interia.pl>2020-05-15 11:28:59 +0200
commitc1b4669ee227a479516f37ce1b9dff5f2d2bef38 (patch)
tree938be2af1d65c828209aa080214a60a4d6a84b18 /runners
parent2111368b7de46be059aa9114cf516ae89dac363d (diff)
downloaddokka-c1b4669ee227a479516f37ce1b9dff5f2d2bef38.tar.gz
dokka-c1b4669ee227a479516f37ce1b9dff5f2d2bef38.tar.bz2
dokka-c1b4669ee227a479516f37ce1b9dff5f2d2bef38.zip
Fix ConfigurationExtractor compilation finding
Diffstat (limited to 'runners')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt6
1 files changed, 2 insertions, 4 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt
index 393a3077..ca7e4f1e 100644
--- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt
+++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt
@@ -33,11 +33,9 @@ class ConfigurationExtractor(private val project: Project) {
?: run { project.logger.error("No source set with name '$sourceSetName' found"); return null }
val compilation = when (projectExtension) {
is KotlinMultiplatformExtension -> projectExtension.targets.flatMap { it.compilations }
- .first { it.kotlinSourceSets.contains(sourceSet) }
+ .find { it.kotlinSourceSets.contains(sourceSet) }
is KotlinSingleTargetExtension -> projectExtension.target.compilations.find {
- it.kotlinSourceSets.contains(
- sourceSet
- )
+ it.kotlinSourceSets.contains(sourceSet)
}
else -> null
} ?: run { project.logger.error("No compilation found for set with name '$sourceSetName'"); return null }