diff options
author | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-20 17:23:10 +0100 |
---|---|---|
committer | Błażej Kardyś <bkardys@virtuslab.com> | 2020-11-27 03:15:02 +0100 |
commit | 3cb4702a68139788de6e1f7b087ced345f2b71ba (patch) | |
tree | a383471c9915ae4aaff078b4f3b81bb99a4fde35 /plugins/all-modules-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt | |
parent | 076a5f421c5e4621539efd814be612f43fef33f5 (diff) | |
download | dokka-3cb4702a68139788de6e1f7b087ced345f2b71ba.tar.gz dokka-3cb4702a68139788de6e1f7b087ced345f2b71ba.tar.bz2 dokka-3cb4702a68139788de6e1f7b087ced345f2b71ba.zip |
Changing how multimodule location provider works and improving gfm link substitution
Diffstat (limited to 'plugins/all-modules-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt')
-rw-r--r-- | plugins/all-modules-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/plugins/all-modules-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt b/plugins/all-modules-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt new file mode 100644 index 00000000..9b5251ac --- /dev/null +++ b/plugins/all-modules-page/src/main/kotlin/templates/FallbackTemplateProcessingStrategy.kt @@ -0,0 +1,18 @@ +package org.jetbrains.dokka.allModulesPage.templates + +import kotlinx.coroutines.Dispatchers.IO +import kotlinx.coroutines.coroutineScope +import kotlinx.coroutines.launch +import org.jetbrains.dokka.plugability.DokkaContext +import java.io.File +import java.nio.file.Files + +class FallbackTemplateProcessingStrategy(dokkaContext: DokkaContext) : TemplateProcessingStrategy { + + override suspend fun process(input: File, output: File): Boolean = coroutineScope { + launch(IO) { + Files.copy(input.toPath(), output.toPath()) + } + true + } +}
\ No newline at end of file |