aboutsummaryrefslogtreecommitdiff
path: root/runners/gradle-plugin/src/main/kotlin
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-06-12 12:53:17 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-06-12 12:53:17 +0200
commitafb2bdcf15634390631b56d2159311923bb6461f (patch)
treebb37c8e8ef58c921b06adc1cd6f5f07851b9b39e /runners/gradle-plugin/src/main/kotlin
parentf40da61c875e3d01edb13103bef16dfd51bcde51 (diff)
downloaddokka-afb2bdcf15634390631b56d2159311923bb6461f.tar.gz
dokka-afb2bdcf15634390631b56d2159311923bb6461f.tar.bz2
dokka-afb2bdcf15634390631b56d2159311923bb6461f.zip
Fix for ArtifactResolveException bug in Gradle for Android
Diffstat (limited to 'runners/gradle-plugin/src/main/kotlin')
-rw-r--r--runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/ConfigurationExtractor.kt11
1 files changed, 8 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 583d352a..0dc5bed1 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
@@ -4,6 +4,7 @@ import org.gradle.api.NamedDomainObjectCollection
import org.gradle.api.Project
import org.gradle.api.Task
import org.gradle.api.UnknownDomainObjectException
+import org.gradle.api.artifacts.ResolveException
import org.gradle.api.file.FileCollection
import org.gradle.api.plugins.JavaPluginConvention
import org.gradle.api.tasks.SourceSet
@@ -88,10 +89,14 @@ object ConfigurationExtractor {
allSourceRoots += taskSourceRoots.filter { it.exists() }
}
}
+ val classpath: MutableList<File> = try {
+ allClasspathFileCollection.toMutableList()
+ } catch (e: ResolveException) {
+ mutableListOf()
+ }
+ classpath.addAll (project.files(allClasspath).toList())
- return PlatformData(null,
- (allClasspathFileCollection + project.files(allClasspath)).toList(), allSourceRoots.toList(), ""
- )
+ return PlatformData(null, classpath, allSourceRoots.toList(), "")
}
fun extractFromJavaPlugin(project: Project): PlatformData? =