From 6dc0b43d0e2712b2a145fb311411794eaa6f19de Mon Sep 17 00:00:00 2001 From: "sebastian.sellmair" Date: Fri, 31 Jul 2020 15:52:31 +0200 Subject: Split AnalysisEnvironment.kt into multiple files and simplify getClasspathFromRegularTask --- .../org/jetbrains/dokka/gradle/ConfigurationExtractor.kt | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'runners/gradle-plugin') 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 efd4e466..6217703f 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 @@ -167,13 +167,10 @@ class ConfigurationExtractor(private val project: Project) { val ownDependencyFiles: Set = compilation.compileDependencyFiles.files // the dependencies provided by the platform (e.g. Kotlin/Native platform libs) - val platformDependencyFiles: Set = if (compilation is KotlinNativeCompilation) { - compilation.target.project.configurations - .findByName(compilation.defaultSourceSet.implementationMetadataConfigurationName) - ?.let { nativePlatformDependencyConfiguration -> - nativePlatformDependencyConfiguration.files - } ?: emptySet() - } else emptySet() + val platformDependencyFiles: Set = (compilation as? KotlinNativeCompilation) + ?.target?.project?.configurations + ?.findByName(compilation.defaultSourceSet.implementationMetadataConfigurationName)?.files + ?: emptySet() return (ownDependencyFiles + platformDependencyFiles).toList().filter { it.exists() } } @@ -185,8 +182,4 @@ class ConfigurationExtractor(private val project: Project) { val dependentSourceSets: List, val platform: String ) : Serializable - - companion object { - private const val KOTLIN_NATIVE_HOME_PRIVATE_PROPERTY = "konanHome" - } } -- cgit