aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/plugability/DokkaContext.kt
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2020-04-20 23:10:22 +0200
committerPaweł Marks <Kordyjan@users.noreply.github.com>2020-04-22 12:12:49 +0200
commit58126c324c30fff4f65fef7cc72aa715364ef358 (patch)
treeb4288c82837559c466882c284d7ca3efa2834a1d /core/src/main/kotlin/plugability/DokkaContext.kt
parent67b9fb52497659bb8d8e61cc3c4016a718a545a7 (diff)
downloaddokka-58126c324c30fff4f65fef7cc72aa715364ef358.tar.gz
dokka-58126c324c30fff4f65fef7cc72aa715364ef358.tar.bz2
dokka-58126c324c30fff4f65fef7cc72aa715364ef358.zip
Fix incorrect plugins paths when project is on a different filesystem than Gradle
Diffstat (limited to 'core/src/main/kotlin/plugability/DokkaContext.kt')
-rw-r--r--core/src/main/kotlin/plugability/DokkaContext.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/src/main/kotlin/plugability/DokkaContext.kt b/core/src/main/kotlin/plugability/DokkaContext.kt
index c5a08a56..cefcd286 100644
--- a/core/src/main/kotlin/plugability/DokkaContext.kt
+++ b/core/src/main/kotlin/plugability/DokkaContext.kt
@@ -33,7 +33,8 @@ interface DokkaContext {
pluginOverrides: List<DokkaPlugin>
): DokkaContext =
DokkaContextConfigurationImpl(logger, configuration, platforms).apply {
- configuration.pluginsClasspath.map { it.relativeTo(File(".").absoluteFile).toURI().toURL() }
+ // File(it.path) is a workaround for an incorrect filesystem in a File instance returned by Gradle.
+ configuration.pluginsClasspath.map { File(it.path).toURI().toURL() }
.toTypedArray()
.let { URLClassLoader(it, this.javaClass.classLoader) }
.also { checkClasspath(it) }