Adding Dokka source to AOSP

This is taken from commit 4ff3d4153ca344398bffcdaaa28f1a1f6e76f6ad from
https://github.com/google/dokka, which is Google's customized fork of
Dokka (https://github.com/Kotlin/dokka).

Bug: 135767980
Test: ./gradlew :core:cleanTest :core:test
Test: ./gradlew :runners:gradle-integration-tests:clean :runners:gradle-integration-tests:test

Change-Id: I332d0b522706e353c3837f6308aac1a8340d71d3
diff --git a/core/src/main/kotlin/Generation/Generator.kt b/core/src/main/kotlin/Generation/Generator.kt
new file mode 100644
index 0000000..23286e2
--- /dev/null
+++ b/core/src/main/kotlin/Generation/Generator.kt
@@ -0,0 +1,29 @@
+package org.jetbrains.dokka
+
+import java.io.File
+
+interface Generator {
+    fun buildPages(nodes: Iterable<DocumentationNode>)
+    fun buildOutlines(nodes: Iterable<DocumentationNode>)
+    fun buildSupportFiles()
+    fun buildPackageList(nodes: Iterable<DocumentationNode>)
+}
+
+fun Generator.buildAll(nodes: Iterable<DocumentationNode>) {
+    buildPages(nodes)
+    buildOutlines(nodes)
+    buildSupportFiles()
+    buildPackageList(nodes)
+}
+
+fun Generator.buildPage(node: DocumentationNode): Unit = buildPages(listOf(node))
+
+fun Generator.buildOutline(node: DocumentationNode): Unit = buildOutlines(listOf(node))
+
+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