From 9e7154fef3394698dc52c52d61dd1aefde29251e Mon Sep 17 00:00:00 2001 From: Kamil Doległo Date: Tue, 24 Dec 2019 01:19:10 +0100 Subject: Use a different method for classpath extraction from Android task Fixes https://github.com/Kotlin/dokka/issues/549 --- .../org/jetbrains/dokka/gradle/ConfigurationExtractor.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'runners') 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 f3ce7d6f..39672b9a 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 @@ -224,10 +224,14 @@ class ConfigurationExtractor(private val project: Project) { if (platform == KotlinPlatformType.androidJvm) KotlinPlatformType.jvm.toString() else platform.toString() private fun accumulateClassPaths(variantNames: List, target: KotlinTarget) = - if (variantNames.isNotEmpty()) + if (variantNames.isNotEmpty()) { variantNames.flatMap { getClasspath(target, it) }.distinct() - else - getClasspath(getMainCompilation(target)) + } else { + if (target.isAndroidTarget()) + getClasspathFromAndroidTask(getMainCompilation(target)) + else + getClasspath(getMainCompilation(target)) + } private fun accumulateSourceSets(variantNames: List, target: KotlinTarget) = if (variantNames.isNotEmpty()) -- cgit