aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Doległo <kamilok1965@interia.pl>2019-09-15 23:29:59 +0200
committerKamil Doległo <kamilok1965@interia.pl>2019-09-15 23:29:59 +0200
commitdc5f41e71cb1240a19ee24c18281319cf1ee27ce (patch)
tree7f5210fbe7662f5614d7c7b48cb89f6e7ea4a3dd
parentc18053227f4cc2ffc06453b45a5a8a6c902a43f3 (diff)
downloaddokka-dc5f41e71cb1240a19ee24c18281319cf1ee27ce.tar.gz
dokka-dc5f41e71cb1240a19ee24c18281319cf1ee27ce.tar.bz2
dokka-dc5f41e71cb1240a19ee24c18281319cf1ee27ce.zip
Readme update
-rw-r--r--README.md20
1 files changed, 14 insertions, 6 deletions
diff --git a/README.md b/README.md
index 9a9fb2d1..75e018e8 100644
--- a/README.md
+++ b/README.md
@@ -183,7 +183,9 @@ dokka {
#### Multiplatform
Since version 0.10.0 dokka supports multiplatform projects. For a general understanding how a multiplatform documentation is generated, please consult the [FAQ](https://github.com/Kotlin/dokka/wiki/faq).
-In the multiplatform mode, the `configuration` block is replaced by a `multiplatform` block which has inner blocks for each platform. The inner blocks can be named arbitrarly, however if you want to use source roots and classpath provided by Kotlin Multiplatform plugin, they must have the same names. See an example below:
+In the multiplatform mode, instead of using the `configuration` block, you should use a `multiplatform` block with inner blocks for each platform.
+The `configuration` block's parameters belong to those inner blocks, which can be named arbitrarly, however if you want to use source roots and classpath provided by Kotlin Multiplatform plugin,
+they must have the same names as in the Kotlin Multiplatform plugin. See an example below:
Groovy
```groovy
@@ -197,7 +199,10 @@ dokka {
outputFormat = "html"
multiplatform {
- customName {} // The same name as in Kotlin Multiplatform plugin, so the sources are fetched automatically
+ customName { // The same name as in Kotlin Multiplatform plugin, so the sources are fetched automatically
+ includes = ['packages.md', 'extra.md']
+ samples = ['samples/basic.kt', 'samples/advanced.kt']
+ }
differentName { // Different name, so source roots, classpath and platform must be passed explicitly.
targets = ["JVM"]
@@ -225,7 +230,10 @@ val dokka by getting(DokkaTask::class) {
outputFormat = "html"
multiplatform {
- val customName by creating {} // The same name as in Kotlin Multiplatform plugin, so the sources are fetched automatically
+ val customName by creating { // The same name as in Kotlin Multiplatform plugin, so the sources are fetched automatically
+ includes = listOf("packages.md", "extra.md")
+ samples = listOf("samples/basic.kt", "samples/advanced.kt")
+ }
register("differentName") { // Different name, so source roots must be passed explicitly
targets = listOf("JVM")
@@ -285,9 +293,9 @@ To generate the documentation, use the `dokka` Gradle task:
More dokka tasks can be added to a project like this:
```groovy
-task dokkaJavadoc(type: org.jetbrains.dokka.gradle.DokkaTask) {
- outputFormat = 'javadoc'
- outputDirectory = "$buildDir/javadoc"
+task dokkaMarkdown(type: org.jetbrains.dokka.gradle.DokkaTask) {
+ outputFormat = 'markdown'
+ outputDirectory = "$buildDir/markdown"
}
```