diff options
Diffstat (limited to 'runners')
-rw-r--r-- | runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt index c5863318..bafe657e 100644 --- a/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt +++ b/runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/DokkaTask.kt @@ -84,20 +84,9 @@ open class DokkaTask : DefaultTask() { private var outputDiagnosticInfo: Boolean = false // Workaround for Gradle, which fires some methods (like collectConfigurations()) multiple times in its lifecycle - private fun tryResolveFatJar(configuration: Configuration?, level: Int = 0): Set<File> { - val maxRetries = 10 - return try { - configuration!!.resolve() - } catch (e: Exception) { - if (level >= maxRetries) - throw IllegalStateException("Cannot resolve dokka fatjar! Make sure you have jcenter() in your repositories") - project.parent?.let { tryResolveFatJar(configuration, level + 1) } ?: throw e - } - } - private fun loadFatJar() { if (ClassloaderContainer.fatJarClassLoader == null) { - val jars = tryResolveFatJar(dokkaRuntime).toList() + val jars = dokkaRuntime!!.resolve().toList() ClassloaderContainer.fatJarClassLoader = URLClassLoader(jars.map { it.toURI().toURL() }.toTypedArray(), ClassLoader.getSystemClassLoader().parent) } } |