aboutsummaryrefslogtreecommitdiff
path: root/examples/gradle/dokka-multiplatform-example/README.md
blob: 9b8a85e68b8b82b03c56b975c694a80761800487 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Dokka Multiplatform example

This example demonstrates Dokka's configuration and output for a simple 
[Kotlin Multiplatform](https://kotlinlang.org/docs/multiplatform.html) project.

It contains [Kotlin source sets](https://kotlinlang.org/docs/multiplatform-discover-project.html#source-sets) for different
platforms that are automatically picked up by Dokka from the Kotlin Gradle Plugin, and an additional custom source
set known to Dokka only.

The example demonstrates the following things:

* Documentation for common code
* Documentation for expect/actual declarations available via tabs
* Documentation for platform-specific declarations, including functions from different source sets, but 
  with clashing names
* Use of Platform-specific API, such as `CPointer` from `kotlinx.cinterop`

You can see up-to-date documentation generated for this example on
[GitHub Pages](https://kotlin.github.io/dokka/examples/dokka-multiplatform-example/html/index.html).

![screenshot demonstration of output](demo.png)

### Running

Run `dokkaHtml` task in order to generate documentation for this example:

```bash
./gradlew dokkaHtml
```