diff options
author | Kamil Doległo <kamilok1965@interia.pl> | 2019-12-24 01:19:10 +0100 |
---|---|---|
committer | Kamil Doległo <kamilok1965@interia.pl> | 2019-12-24 01:19:10 +0100 |
commit | 9e7154fef3394698dc52c52d61dd1aefde29251e (patch) | |
tree | 2cbe252c109a2d93a56df65113e610e097e46500 /runners/gradle-plugin/src | |
parent | 10f5f9ee902381315e4032571db0cbe896141fc2 (diff) | |
download | dokka-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.kt | 10 |
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()) |