aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main
diff options
context:
space:
mode:
authorsebastian.sellmair <sebastian.sellmair@jetbrains.com>2020-07-31 15:52:31 +0200
committerSebastian Sellmair <34319766+sellmair@users.noreply.github.com>2020-07-31 17:54:04 +0200
commit6dc0b43d0e2712b2a145fb311411794eaa6f19de (patch)
tree3aa6dd54e8a29980518de01caac6b3297aff7dd3 /runners/gradle-plugin/src/main
parent582db8d659877cd2c482d485e0ba19913dba3a6a (diff)
downloaddokka-6dc0b43d0e2712b2a145fb311411794eaa6f19de.tar.gz
dokka-6dc0b43d0e2712b2a145fb311411794eaa6f19de.tar.bz2
dokka-6dc0b43d0e2712b2a145fb311411794eaa6f19de.zip
Split AnalysisEnvironment.kt into multiple files and simplify getClasspathFromRegularTask
Diffstat (limited to 'runners/gradle-plugin/src/main')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt15
1 files changed, 4 insertions, 11 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 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<File> = compilation.compileDependencyFiles.files
// the dependencies provided by the platform (e.g. Kotlin/Native platform libs)
- val platformDependencyFiles: Set<File> = if (compilation is KotlinNativeCompilation) {
- compilation.target.project.configurations
- .findByName(compilation.defaultSourceSet.implementationMetadataConfigurationName)
- ?.let { nativePlatformDependencyConfiguration ->
- nativePlatformDependencyConfiguration.files
- } ?: emptySet()
- } else emptySet()
+ val platformDependencyFiles: Set<File> = (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<String>,
val platform: String
) : Serializable
-
- companion object {
- private const val KOTLIN_NATIVE_HOME_PRIVATE_PROPERTY = "konanHome"
- }
}