diff options
Diffstat (limited to 'core/src/main/kotlin/Generation')
-rw-r--r-- | core/src/main/kotlin/Generation/FileGenerator.kt | 2 | ||||
-rw-r--r-- | core/src/main/kotlin/Generation/Generator.kt | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/core/src/main/kotlin/Generation/FileGenerator.kt b/core/src/main/kotlin/Generation/FileGenerator.kt index 3193a5bc..9c7c65e6 100644 --- a/core/src/main/kotlin/Generation/FileGenerator.kt +++ b/core/src/main/kotlin/Generation/FileGenerator.kt @@ -14,6 +14,8 @@ class FileGenerator @Inject constructor(@Named("outputDir") val rootFile: File) @set:Inject(optional = true) lateinit var options: DocumentationOptions @set:Inject(optional = true) var packageListService: PackageListService? = null + override val root: File = rootFile + override fun location(node: DocumentationNode): FileLocation { return FileLocation(File(rootFile, relativePathToNode(node.path.map { it.name }, node.members.any())).appendExtension(formatService.extension)) } diff --git a/core/src/main/kotlin/Generation/Generator.kt b/core/src/main/kotlin/Generation/Generator.kt index 003386ef..23286e29 100644 --- a/core/src/main/kotlin/Generation/Generator.kt +++ b/core/src/main/kotlin/Generation/Generator.kt @@ -1,5 +1,7 @@ package org.jetbrains.dokka +import java.io.File + interface Generator { fun buildPages(nodes: Iterable<DocumentationNode>) fun buildOutlines(nodes: Iterable<DocumentationNode>) @@ -23,4 +25,5 @@ fun Generator.buildAll(node: DocumentationNode): Unit = buildAll(listOf(node)) interface NodeLocationAwareGenerator: Generator { fun location(node: DocumentationNode): Location + val root: File }
\ No newline at end of file |