• Home
Name Date Size #Lines LOC

..--

.idea/03-May-2024-331331

buildSrc/03-May-2024-220182

core/03-May-2024-32,26525,482

gradle/wrapper/03-May-2024-65

integration/03-May-2024-230187

runners/03-May-2024-3,7922,871

test/03-May-2024-9955

.gitignoreD03-May-20241.9 KiB10582

Android.bpD03-May-20241.2 KiB3432

LICENSED03-May-202411.1 KiB203169

METADATAD03-May-2024328 1716

NOTICED03-May-202411.1 KiB203169

OWNERSD03-May-2024118 76

README.androidD03-May-20246.5 KiB235153

README.mdD03-May-202419.1 KiB484377

build-docs.xmlD03-May-2024744 2116

build.gradleD03-May-20243.8 KiB128105

busytown.gradleD03-May-20241.3 KiB3934

busytown.shD03-May-2024257 63

gradle.propertiesD03-May-2024398 2116

gradlewD03-May-20245.2 KiB173128

gradlew.batD03-May-20242.1 KiB8561

package-listD03-May-202420.3 KiB218217

settings.gradleD03-May-2024383 1311

README.android

1URL: https://github.com/Kotlin/dokka
2License: Apache 2
3Description: "Dokka is a documentation engine for Kotlin and Java."
4
5Changes in this fork
6--------------------
7This fork of Dokka contains changes for generating reference documentation on
8developer.android.com.
9
10This repository was previously hosted at https://github.com/google/dokka, and
11moved to AOSP as of commit 4ff3d4153ca344398bffcdaaa28f1a1f6e76f6ad.  It was
12initally forked from https://github.com/Kotlin/dokka after commit
137a066afb0ba47b5b57e98a5d821a0cbe97322670.
14
15Development took place on the "devsite-with-java-layout-html" on both the
16upstream Dokka repository and the fork on GitHub.  For a complete list of
17changes, see
18
19https://github.com/google/dokka/compare/7a066afb0ba47b5b57e98a5d821a0cbe97322670...4ff3d4153ca344398bffcdaaa28f1a1f6e76f6ad
20
21which is echoed here:
22
23commit 4ff3d4153ca344398bffcdaaa28f1a1f6e76f6ad
24Author: Gautam Ajjarapu <gautam@ajjarapu.com>
25Date:   Fri Jun 14 13:54:08 2019 -0700
26
27    Automate Downloading of Code Samples (#58)
28
29commit 47cc6dcfb4b39f0ecbb5aba53c34aa7d54a1a01e
30Author: Gautam Ajjarapu <ajjarapu@google.com>
31Date:   Fri Jun 7 16:03:00 2019 -0700
32
33    API Info Alignment Fix (#56)
34
35    * alignment fix
36
37    * Removed temporary solution of using method parameter inHeader because
38      changing api-info div solved spacing problem
39
40commit b2821b7a89ce501b9e8edea26b2defa03dcc6bc8
41Author: mvivo <mvivo@google.com>
42Date:   Tue May 21 15:53:43 2019 +0200
43
44    Adds API info to classes
45
46commit 04c35131eb4df0899430308c203520627deab0b4
47Author: Tiem Song <tiem@google.com>
48Date:   Fri Apr 26 12:36:59 2019 -0700
49
50    Update Dokka to version 0.9.17-g002
51
52commit d0449587ad7e380846c078ecc3714ce3a326448a
53Author: Tiem Song <tiem@google.com>
54Date:   Fri Apr 26 11:07:17 2019 -0700
55
56    Process rowspan
57
58    This is a follow up PR to #45
59
60commit d8d07776f790f6be848c6ce6a085dbd00c52ea43
61Author: Manuel Vivo <manuelvicnt@gmail.com>
62Date:   Fri Apr 26 19:23:16 2019 +0200
63
64     Process HTML code in comments (#45)
65
66    * Handle Special Reference for callouts
67
68    * Process HTML code in comments
69
70    * Adds colspan to td & th
71
72commit f76cba219c2fcc051f4f19b72df58d14f3c542fc
73Author: Manuel Vivo <mvivo@google.com>
74Date:   Wed Apr 24 15:57:39 2019 +0200
75
76    Processes @sample in Java documentation
77
78commit d0bda76a4d07d467594f3fed4359faab74e51608
79Author: mvivo <mvivo@google.com>
80Date:   Thu Apr 25 15:07:32 2019 +0200
81
82    Adds devsite-heading HTML tag to table headers
83
84commit 8fcffad51ef034e38d100693fac755cae0766d73
85Author: Manuel Vivo <manuelvicnt@gmail.com>
86Date:   Thu Apr 25 07:38:21 2019 +0200
87
88    Display deprecated in a callout and class index (#41)
89
90    * Display deprecated callout in classes and enums
91
92    * Follow Google style reference guide
93
94    * Make deprecation message generic
95
96    * Add deprecation message to class index
97
98    * Add HtmlFormatTest back
99
100    * Extends wording to more classes
101
102commit 1f903e7ebe2e29bcf6773615525d991f49707b5d
103Author: mvivo <mvivo@google.com>
104Date:   Mon Apr 22 16:19:44 2019 +0200
105
106    Adds enum table to class summary
107
108commit 3caaa4425bd146b07077d6e040776fd1a5ba6933
109Author: Manuel Vivo <mvivo@google.com>
110Date:   Wed Apr 10 20:42:34 2019 +0200
111
112    Display XML attributes with a short description
113
114commit 200d6131c1aea49db8d5a9ed0a120ab46834da37
115Author: mvivo <mvivo@google.com>
116Date:   Wed Apr 10 15:26:06 2019 +0200
117
118    Follow Google style reference
119
120commit e4ecf324642e0b7a359aa163848df6996ec7a57f
121Author: Manuel Vivo <mvivo@google.com>
122Date:   Tue Apr 9 19:34:01 2019 +0200
123
124    Handle Special Reference for callouts
125
126commit 6c41c5db202ddda907e79a7a63f7c306c81636a3
127Author: Tiem Song <tiem@google.com>
128Date:   Thu Apr 11 09:17:20 2019 -0700
129
130    Update Dokka to version 0.9.17-g001
131
132    This release also uses the new naming convention, using a -gXXX suffix
133    instead of a -g<Date> suffix.
134
135commit 83b513effdb12e74f5560a464c266b1965bf44c2
136Author: mvivo <mvivo@google.com>
137Date:   Wed Apr 10 16:19:31 2019 +0200
138
139    Add tests to CodeNode
140
141commit f9e69f02ae6704ec797b390b178886c4d53bacb2
142Author: mvivo <mvivo@google.com>
143Date:   Tue Apr 9 16:29:23 2019 +0200
144
145    Add Java multiline code
146
147commit 47f3ab52ba16b72ed346db82dd1dd36de23367af
148Author: Manuel Vivo <mvivo@google.com>
149Date:   Mon Apr 8 20:27:04 2019 +0200
150
151    Remove deprecated version in classes
152
153commit 9e26ab39a86f18c919257763733ec7a36080065b
154Author: Manuel Vivo <mvivo@google.com>
155Date:   Mon Apr 8 20:20:02 2019 +0200
156
157    Add description to XML attributes
158
159commit 7c70db208725d6442b3739a42cc4d7351dde48d9
160Author: Tiem Song <tiem@google.com>
161Date:   Fri Apr 5 10:04:47 2019 -0700
162
163    Rename minApiLevel method
164
165    This method was originally created to fetch the API level for minimum API
166    usage.  The logic of the method itself doesn't really pertain to minimum or
167    deprecation - it's just finding a Doc Tag from the data elements.  Thus,
168    this method should be renamed apiLevel() or something similar, with the
169    "min" part removed to avoid confusion.
170
171    Bug: 129726096
172
173commit b64371e2845b0a05dcf2f50a383bd043fc750384
174Author: Tiem Song <tiem@google.com>
175Date:   Thu Apr 4 16:19:06 2019 -0700
176
177    Update package for StringExtensions
178
179    This is to fix issues when developing on a case sensitive file system /
180    MacOS.  This is a continuation of
181    https://github.com/google/dokka/pull/29.
182
183commit 7baef1414f61adcd77963581bffcd0f80d820059
184Author: Manuel Vivo <mvivo@google.com>
185Date:   Wed Apr 3 20:09:15 2019 +0200
186
187    Fix tests broken by pull 32
188
189commit daf718e858242a82b42d3cecd9ec6d23e680f9da
190Author: Manuel Vivo <mvivo@google.com>
191Date:   Wed Apr 3 11:39:44 2019 +0200
192
193    Strikethrough words are inline
194
195commit 67b37de06ed23105a4f78957f1a99654459028b9
196Author: Manuel Vivo <manuelvicnt@gmail.com>
197Date:   Wed Apr 3 19:00:09 2019 +0200
198
199    List functions in alphabetical order (#32)
200
201    * List functions in alphabetical order
202
203    * Order other members alphabetically
204
205commit 97871cf42bf724645eb2ed4d1dd16304083e44cd
206Author: Manuel Vivo <manuelvicnt@gmail.com>
207Date:   Tue Apr 2 22:15:22 2019 +0200
208
209    Show summary on deprecated methods (#31)
210
211commit b5e480e1c087b5a5307a9176bb2835ebbebee8b0
212Author: Manuel Vivo <manuelvicnt@gmail.com>
213Date:   Tue Apr 2 22:12:56 2019 +0200
214
215    Process deprecatedSince annotation (#30)
216
217    * Process deprecatedSince annotation
218
219    * Add info to class
220
221    * Capitalize wording
222
223commit f4f7e6fa673fe13fff68dd1bf3c005bf9d94875c
224Author: mvivo <mvivo@google.com>
225Date:   Fri Mar 29 12:20:59 2019 +0100
226
227    Improve Java enums documentation
228
229commit c1c86b92c15b97e7aec41ed9892aa6965974d66f
230Author: Tiem Song <tiem@google.com>
231Date:   Fri Mar 29 10:45:06 2019 -0700
232
233    Move StringExtensions file to Utilities directory
234
235

README.md

1dokka
2=====
3
4**_Note_: This is Google's fork of Dokka, customized for [Android API reference docs](https://developer.android.com/reference/)
5on [developer.android.com](https://developer.android.com/) and other Google products.**
6
7Dokka is a documentation engine for Kotlin, performing the same function as javadoc for Java.
8Just like Kotlin itself, Dokka fully supports mixed-language Java/Kotlin projects. It understands
9standard Javadoc comments in Java files and [KDoc comments](https://kotlinlang.org/docs/reference/kotlin-doc.html) in Kotlin files,
10and can generate documentation in multiple formats including standard Javadoc, HTML and Markdown.
11
12## Using Dokka
13
14### Using the Gradle plugin
15
16```groovy
17buildscript {
18    repositories {
19        jcenter()
20    }
21
22    dependencies {
23        classpath "org.jetbrains.dokka:dokka-gradle-plugin:${dokka_version}"
24    }
25}
26
27apply plugin: 'org.jetbrains.dokka'
28```
29
30The plugin adds a task named "dokka" to the project.
31
32Minimal dokka configuration:
33
34```groovy
35dokka {
36    outputFormat = 'html'
37    outputDirectory = "$buildDir/javadoc"
38}
39```
40
41[Output formats](#output_formats)
42
43The available configuration options are shown below:
44
45```groovy
46dokka {
47    moduleName = 'data'
48    outputFormat = 'html'
49    outputDirectory = "$buildDir/javadoc"
50
51    // These tasks will be used to determine source directories and classpath
52    kotlinTasks {
53        defaultKotlinTasks() + [':some:otherCompileKotlin', project("another").compileKotlin]
54    }
55
56    // List of files with module and package documentation
57    // http://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation
58    includes = ['packages.md', 'extra.md']
59
60    // The list of files or directories containing sample code (referenced with @sample tags)
61    samples = ['samples/basic.kt', 'samples/advanced.kt']
62
63    jdkVersion = 6 // Used for linking to JDK
64
65    // Use default or set to custom path to cache directory
66    // to enable package-list caching
67    // When set to default, caches stored in $USER_HOME/.cache/dokka
68    cacheRoot = 'default'
69
70    // Use to include or exclude non public members.
71    includeNonPublic = false
72
73    // Do not output deprecated members. Applies globally, can be overridden by packageOptions
74    skipDeprecated = false
75
76    // Emit warnings about not documented members. Applies globally, also can be overridden by packageOptions
77    reportUndocumented = true
78
79    skipEmptyPackages = true // Do not create index pages for empty packages
80
81    impliedPlatforms = ["JVM"] // See platforms section of documentation
82
83    // Manual adding files to classpath
84    // This property not overrides classpath collected from kotlinTasks but appends to it
85    classpath = [new File("$buildDir/other.jar")]
86
87    // By default, sourceRoots is taken from kotlinTasks, following roots will be appended to it
88    // Short form sourceRoots
89    sourceDirs = files('src/main/kotlin')
90
91    // By default, sourceRoots is taken from kotlinTasks, following roots will be appended to it
92    // Full form sourceRoot declaration
93    // Repeat for multiple sourceRoots
94    sourceRoot {
95        // Path to source root
96        path = "src"
97        // See platforms section of documentation
98        platforms = ["JVM"]
99    }
100
101    // Specifies the location of the project source code on the Web.
102    // If provided, Dokka generates "source" links for each declaration.
103    // Repeat for multiple mappings
104    linkMapping {
105        // Source directory
106        dir = "src/main/kotlin"
107
108        // URL showing where the source code can be accessed through the web browser
109        url = "https://github.com/cy6erGn0m/vertx3-lang-kotlin/blob/master/src/main/kotlin"
110
111        // Suffix which is used to append the line number to the URL. Use #L for GitHub
112        suffix = "#L"
113    }
114
115    // No default documentation link to kotlin-stdlib
116    noStdlibLink = false
117
118    // Allows linking to documentation of the project's dependencies (generated with Javadoc or Dokka)
119    // Repeat for multiple links
120    externalDocumentationLink {
121        // Root URL of the generated documentation to link with. The trailing slash is required!
122        url = new URL("https://example.com/docs/")
123
124        // If package-list file located in non-standard location
125        // packageListUrl = new URL("file:///home/user/localdocs/package-list")
126    }
127
128    // Allows to customize documentation generation options on a per-package basis
129    // Repeat for multiple packageOptions
130    packageOptions {
131        prefix = "kotlin" // will match kotlin and all sub-packages of it
132        // All options are optional, default values are below:
133        skipDeprecated = false
134        reportUndocumented = true // Emit warnings about not documented members
135        includeNonPublic = false
136    }
137    // Suppress a package
138    packageOptions {
139        prefix = "kotlin.internal" // will match kotlin.internal and all sub-packages of it
140        suppress = true
141    }
142}
143```
144
145To generate the documentation, use the `dokka` Gradle task:
146
147```bash
148./gradlew dokka
149```
150
151More dokka tasks can be added to a project like this:
152
153```groovy
154task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
155    outputFormat = 'javadoc'
156    outputDirectory = "$buildDir/javadoc"
157}
158```
159
160Please see the [Dokka Gradle example project](https://github.com/JetBrains/kotlin-examples/tree/master/gradle/dokka-gradle-example) for an example.
161
162#### Android
163
164If you are using Android there is a separate Gradle plugin. Just make sure you apply the plugin after
165`com.android.library` and `kotlin-android`.
166
167```groovy
168buildscript {
169    repositories {
170        jcenter()
171    }
172
173    dependencies {
174        classpath "org.jetbrains.dokka:dokka-android-gradle-plugin:${dokka_version}"
175    }
176}
177
178apply plugin: 'com.android.library'
179apply plugin: 'kotlin-android'
180apply plugin: 'org.jetbrains.dokka-android'
181```
182
183### Using the Maven plugin
184
185The Maven plugin is available in JCenter. You need to add the JCenter repository to the list of plugin repositories if it's not there:
186
187```xml
188<pluginRepositories>
189    <pluginRepository>
190        <id>jcenter</id>
191        <name>JCenter</name>
192        <url>https://jcenter.bintray.com/</url>
193    </pluginRepository>
194</pluginRepositories>
195```
196
197Minimal Maven configuration is
198
199```xml
200<plugin>
201    <groupId>org.jetbrains.dokka</groupId>
202    <artifactId>dokka-maven-plugin</artifactId>
203    <version>${dokka.version}</version>
204    <executions>
205        <execution>
206            <phase>pre-site</phase>
207            <goals>
208                <goal>dokka</goal>
209            </goals>
210        </execution>
211    </executions>
212</plugin>
213```
214
215By default files will be generated in `target/dokka`.
216
217The following goals are provided by the plugin:
218
219  * `dokka:dokka` - generate HTML documentation in Dokka format (showing declarations in Kotlin syntax);
220  * `dokka:javadoc` - generate HTML documentation in JavaDoc format (showing declarations in Java syntax);
221  * `dokka:javadocJar` - generate a .jar file with JavaDoc format documentation.
222
223The available configuration options are shown below:
224
225```xml
226<plugin>
227    <groupId>org.jetbrains.dokka</groupId>
228    <artifactId>dokka-maven-plugin</artifactId>
229    <version>${dokka.version}</version>
230    <executions>
231        <execution>
232            <phase>pre-site</phase>
233            <goals>
234                <goal>dokka</goal>
235            </goals>
236        </execution>
237    </executions>
238    <configuration>
239
240        <!-- Set to true to skip dokka task, default: false -->
241        <skip>false</skip>
242
243        <!-- Default: ${project.artifactId} -->
244        <moduleName>data</moduleName>
245        <!-- See list of possible formats below -->
246        <outputFormat>html</outputFormat>
247        <!-- Default: ${project.basedir}/target/dokka -->
248        <outputDir>some/out/dir</outputDir>
249
250        <!-- Use default or set to custom path to cache directory to enable package-list caching. -->
251        <!-- When set to default, caches stored in $USER_HOME/.cache/dokka -->
252        <cacheRoot>default</cacheRoot>
253
254        <!-- List of '.md' files with package and module docs -->
255        <!-- http://kotlinlang.org/docs/reference/kotlin-doc.html#module-and-package-documentation -->
256        <includes>
257            <file>packages.md</file>
258            <file>extra.md</file>
259        </includes>
260
261        <!-- List of sample roots -->
262        <samplesDirs>
263            <dir>src/test/samples</dir>
264        </samplesDirs>
265
266        <!-- Used for linking to JDK, default: 6 -->
267        <jdkVersion>6</jdkVersion>
268
269        <!-- Do not output deprecated members, applies globally, can be overridden by packageOptions -->
270        <skipDeprecated>false</skipDeprecated>
271        <!-- Emit warnings about not documented members, applies globally, also can be overridden by packageOptions -->
272        <reportNotDocumented>true</reportNotDocumented>
273        <!-- Do not create index pages for empty packages -->
274        <skipEmptyPackages>true</skipEmptyPackages>
275
276        <!-- See platforms section of documentation -->
277        <impliedPlatforms>
278            <platform>JVM</platform>
279        </impliedPlatforms>
280
281        <!-- Short form list of sourceRoots, by default, set to ${project.compileSourceRoots} -->
282        <sourceDirectories>
283            <dir>src/main/kotlin</dir>
284        </sourceDirectories>
285
286        <!-- Full form list of sourceRoots -->
287        <sourceRoots>
288            <root>
289                <path>src/main/kotlin</path>
290                <!-- See platforms section of documentation -->
291                <platforms>JVM</platforms>
292            </root>
293        </sourceRoots>
294
295        <!-- Specifies the location of the project source code on the Web. If provided, Dokka generates "source" links
296             for each declaration. -->
297        <sourceLinks>
298            <link>
299                <!-- Source directory -->
300                <dir>${project.basedir}/src/main/kotlin</dir>
301                <!-- URL showing where the source code can be accessed through the web browser -->
302                <url>http://github.com/me/myrepo</url>
303                <!--Suffix which is used to append the line number to the URL. Use #L for GitHub -->
304                <urlSuffix>#L</urlSuffix>
305            </link>
306        </sourceLinks>
307
308        <!-- No default documentation link to kotlin-stdlib -->
309        <noStdlibLink>false</noStdlibLink>
310
311        <!-- Allows linking to documentation of the project's dependencies (generated with Javadoc or Dokka) -->
312        <externalDocumentationLinks>
313            <link>
314                <!-- Root URL of the generated documentation to link with. The trailing slash is required! -->
315                <url>https://example.com/docs/</url>
316                <!-- If package-list file located in non-standard location -->
317                <!-- <packageListUrl>file:///home/user/localdocs/package-list</packageListUrl> -->
318            </link>
319        </externalDocumentationLinks>
320
321        <!-- Allows to customize documentation generation options on a per-package basis -->
322        <perPackageOptions>
323            <packageOptions>
324                <!-- Will match kotlin and all sub-packages of it -->
325                <prefix>kotlin</prefix>
326
327                <!-- All options are optional, default values are below: -->
328                <skipDeprecated>false</skipDeprecated>
329                <!-- Emit warnings about not documented members  -->
330                <reportUndocumented>true</reportUndocumented>
331                <includeNonPublic>false</includeNonPublic>
332            </packageOptions>
333        </perPackageOptions>
334    </configuration>
335</plugin>
336```
337
338Please see the [Dokka Maven example project](https://github.com/JetBrains/kotlin-examples/tree/master/maven/dokka-maven-example) for an example.
339
340[Output formats](#output_formats)
341
342### Using the Ant task
343
344The Ant task definition is also contained in the dokka-fatjar.jar referenced above. Here's an example of using it:
345
346```xml
347<project name="Dokka" default="document">
348    <typedef resource="dokka-antlib.xml" classpath="dokka-fatjar.jar"/>
349
350    <target name="document">
351        <dokka src="src" outputdir="doc" modulename="myproject"/>
352    </target>
353</project>
354```
355
356The Ant task supports the following attributes:
357
358  * `outputDir` - the output directory where the documentation is generated
359  * `outputFormat` - the output format (see the list of supported formats above)
360  * `classpath` - list of directories or .jar files to include in the classpath (used for resolving references)
361  * `samples` - list of directories containing sample code (documentation for those directories is not generated but declarations from them can be referenced using the `@sample` tag)
362  * `moduleName` - the name of the module being documented (used as the root directory of the generated documentation)
363  * `include` - names of files containing the documentation for the module and individual packages
364  * `skipDeprecated` - if set, deprecated elements are not included in the generated documentation
365  * `jdkVersion` - version for linking to JDK
366  * `impliedPlatforms` - See [platforms](#platforms) section
367  * `<sourceRoot path="src" platforms="JVM" />` - analogue of src, but allows to specify [platforms](#platforms)
368  * `<packageOptions prefix="kotlin" includeNonPublic="false" reportUndocumented="true" skipDeprecated="false"/>` -
369    Per package options for package `kotlin` and sub-packages of it
370  * `noStdlibLink` - No default documentation link to kotlin-stdlib
371  * `<externalDocumentationLink url="https://example.com/docs/" packageListUrl="file:///home/user/localdocs/package-list"/>` -
372    linking to external documentation, packageListUrl should be used if package-list located not in standard location
373  * `cacheRoot` - Use `default` or set to custom path to cache directory to enable package-list caching. When set to `default`, caches stored in $USER_HOME/.cache/dokka
374
375
376### Using the Command Line
377
378To run Dokka from the command line, download the [Dokka jar](https://github.com/Kotlin/dokka/releases/download/0.9.10/dokka-fatjar.jar).
379To generate documentation, run the following command:
380
381    java -jar dokka-fatjar.jar <source directories> <arguments>
382
383Dokka supports the following command line arguments:
384
385  * `-output` - the output directory where the documentation is generated
386  * `-format` - the [output format](#output-formats):
387  * `-classpath` - list of directories or .jar files to include in the classpath (used for resolving references)
388  * `-samples` - list of directories containing sample code (documentation for those directories is not generated but declarations from them can be referenced using the `@sample` tag)
389  * `-module` - the name of the module being documented (used as the root directory of the generated documentation)
390  * `-include` - names of files containing the documentation for the module and individual packages
391  * `-nodeprecated` - if set, deprecated elements are not included in the generated documentation
392  * `-impliedPlatforms` - List of implied platforms (comma-separated)
393  * `-packageOptions` - List of package options in format `prefix,-deprecated,-privateApi,+warnUndocumented;...`
394  * `-links` - External documentation links in format `url^packageListUrl^^url2...`
395  * `-noStdlibLink` - Disable documentation link to stdlib
396  * `-cacheRoot` - Use `default` or set to custom path to cache directory to enable package-list caching. When set to `default`, caches stored in $USER_HOME/.cache/dokka
397
398
399### Output formats<a name="output_formats"></a>
400
401  * `html` - minimalistic html format used by default
402  * `javadoc` - Dokka mimic to javadoc
403  * `html-as-java` - as `html` but using java syntax
404  * `markdown` - Markdown structured as `html`
405    * `gfm` - GitHub flavored markdown
406    * `jekyll` - Jekyll compatible markdown
407  * `kotlin-website*` - internal format used for documentation on [kotlinlang.org](https://kotlinlang.org)
408
409### Platforms<a name="platforms"></a>
410
411Dokka can annotate elements with special `platform` block with platform requirements
412
413Example of usage can be found on [kotlinlang.org](https://kotlinlang.org/api/latest/jvm/stdlib/)
414
415Each source root has a list of platforms for which members are suitable.
416Also, the list of 'implied' platforms is passed to Dokka.
417If a member is not available for all platforms in the implied platforms set, its documentation will show
418the list of platforms for which it's available.
419
420## Dokka Internals
421
422### Documentation Model
423
424Dokka uses Kotlin-as-a-service technology to build `code model`, then processes it into `documentation model`.
425`Documentation model` is graph of items describing code elements such as classes, packages, functions, etc.
426
427Each node has semantic attached, e.g. Value:name -> Type:String means that some value `name` is of type `String`.
428
429Each reference between nodes also has semantic attached, and there are three of them:
430
4311. Member - reference means that target is member of the source, form tree.
4322. Detail - reference means that target describes source in more details, form tree.
4333. Link - any link to any other node, free form.
434
435Member & Detail has reverse Owner reference, while Link's back reference is also Link.
436
437Nodes that are Details of other nodes cannot have Members.
438
439### Rendering Docs
440
441When we have documentation model, we can render docs in various formats, languages and layouts. We have some core services:
442
443* FormatService -- represents output format
444* LocationService -- represents folder and file layout
445* SignatureGenerator -- represents target language by generating class/function/package signatures from model
446
447Basically, given the `documentation` as a model, we do this:
448
449```kotlin
450    val signatureGenerator = KotlinSignatureGenerator()
451    val locationService = FoldersLocationService(arguments.outputDir)
452    val markdown = JekyllFormatService(locationService, signatureGenerator)
453    val generator = FileGenerator(signatureGenerator, locationService, markdown)
454    generator.generate(documentation)
455```
456
457## Building Dokka
458
459Dokka is built with Gradle. To build it, use `./gradlew build`.
460Alternatively, open the project directory in IntelliJ IDEA and use the IDE to build and run Dokka.
461
462Here's how to import and configure Dokka in IntelliJ IDEA:
463
464* Select "Open" from the IDEA welcome screen, or File > Open if a project is
465  already open
466* Select the directory with your clone of Dokka
467  * Note: IDEA may have an error after the project is initally opened; it is OK
468    to ignore this as the next step will address this error
469* After IDEA opens the project, select File > New > Module from existing sources
470  and select the `build.gradle` file from the root directory of your Dokka clone
471* Use the default options and select "OK"
472* After Dokka is loaded into IDEA, open the Gradle tool window (View > Tool
473  Windows > Gradle) and click on the top left "Refresh all Gradle projects"
474  button
475* Verify the following project settings.  In File > Settings > Build, Execution,
476  Deployment > Build Tools > Gradle > Runner:
477  * Ensure "Delegate IDE build/run actions to gradle" is checked
478  * "Gradle Test Runner" should be selected in the "Run tests using" drop-down
479    menu
480* Note: After closing and re-opening the project, IDEA may give an error
481  message: "Error Loading Project: Cannot load 3 modules".  Open up the details
482  of the error, and click "Remove Selected", as these module `.iml` files are
483  safe to remove.
484