aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-12-24 01:19:10 +0100
committerKamil Doległo <kamilok1965@interia.pl>2019-12-24 01:19:10 +0100
commit9e7154fef3394698dc52c52d61dd1aefde29251e (patch)
tree2cbe252c109a2d93a56df65113e610e097e46500 /runners/gradle-plugin/src
parent10f5f9ee902381315e4032571db0cbe896141fc2 (diff)
downloaddokka-9e7154fef3394698dc52c52d61dd1aefde29251e.tar.gz
dokka-9e7154fef3394698dc52c52d61dd1aefde29251e.tar.bz2
dokka-9e7154fef3394698dc52c52d61dd1aefde29251e.zip
Use a different method for classpath extraction from Android task
Fixes https://github.com/Kotlin/dokka/issues/549
Diffstat (limited to 'runners/gradle-plugin/src')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt10
1 files changed, 7 insertions, 3 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 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<String>, 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<String>, target: KotlinTarget) =
if (variantNames.isNotEmpty())