From c1b4669ee227a479516f37ce1b9dff5f2d2bef38 Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Fri, 15 May 2020 11:28:59 +0200 Subject: Fix ConfigurationExtractor compilation finding --- .../kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'runners/gradle-plugin/src/main/kotlin') 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 } -- cgit