mirror of
https://github.com/2006-Scape/apollo.git
synced 2026-07-04 08:39:27 +00:00
WIP
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
apply plugin: "java"
|
||||
apply plugin: 'kotlin'
|
||||
apply from: "$rootDir/gradle/kotlin.gradle"
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compile group: 'org.jetbrains.kotlin', name: 'kotlin-stdlib-jdk8'
|
||||
|
||||
compile 'org.jetbrains.dokka:dokka-fatjar:0.9.18'
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package org.apollo.tools.dokka2yaml
|
||||
|
||||
import com.google.inject.Binder
|
||||
import org.jetbrains.dokka.FormatService
|
||||
import org.jetbrains.dokka.Formats.FormatDescriptor
|
||||
import org.jetbrains.dokka.Formats.KotlinFormatDescriptorBase
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
class YamlFileFormatDescriptor : KotlinFormatDescriptorBase() {
|
||||
override val formatServiceClass = YamlFileGenerator::class
|
||||
override fun configureAnalysis(binder: Binder) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
override fun configureOutput(binder: Binder) {
|
||||
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.apollo.tools.dokka2yaml
|
||||
|
||||
import org.jetbrains.dokka.DocumentationNode
|
||||
import org.jetbrains.dokka.FormatService
|
||||
import org.jetbrains.dokka.FormattedOutputBuilder
|
||||
import org.jetbrains.dokka.Location
|
||||
|
||||
class YamlFileGenerator(override val extension: String = ".yaml") : FormatService {
|
||||
override fun createOutputBuilder(to: StringBuilder, location: Location): FormattedOutputBuilder {
|
||||
return YamlFileOutputBuilder()
|
||||
}
|
||||
}
|
||||
|
||||
class YamlFileOutputBuilder : FormattedOutputBuilder {
|
||||
override fun appendNodes(nodes: Iterable<DocumentationNode>) {
|
||||
for (node in nodes) {
|
||||
appendNode(node)
|
||||
}
|
||||
}
|
||||
|
||||
fun appendNode(node: DocumentationNode) {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
class=org.apollo.tools.dokka2yaml.YamlFileFormatDescriptor
|
||||
description=Turns KDoc and Javadoc into the code2yaml format for DocFX.
|
||||
Reference in New Issue
Block a user