diff options
author | Marcin Aman <marcin.aman@gmail.com> | 2021-09-10 23:26:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-10 23:26:00 +0200 |
commit | e5aaa76b2ef7faf0b4ed38904f8e50cb2f9c0064 (patch) | |
tree | 653d06190be84812b7a50b39dbe968098ee7b73b /docs/src/doc | |
parent | 13b6fd962bb4d43bb494ab9d336495b32a1f2d0b (diff) | |
download | dokka-e5aaa76b2ef7faf0b4ed38904f8e50cb2f9c0064.tar.gz dokka-e5aaa76b2ef7faf0b4ed38904f8e50cb2f9c0064.tar.bz2 dokka-e5aaa76b2ef7faf0b4ed38904f8e50cb2f9c0064.zip |
Update docs for buildscript with dokka plugins (#2134)
Diffstat (limited to 'docs/src/doc')
-rw-r--r-- | docs/src/doc/docs/user_guide/gradle/usage.md | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/docs/src/doc/docs/user_guide/gradle/usage.md b/docs/src/doc/docs/user_guide/gradle/usage.md index 704b2b94..b5eed4e9 100644 --- a/docs/src/doc/docs/user_guide/gradle/usage.md +++ b/docs/src/doc/docs/user_guide/gradle/usage.md @@ -67,7 +67,9 @@ Most of the configuration options are set per one source set. The available configuration options for are shown below: ```kotlin -dokkaHtml { +import org.jetbrains.dokka.gradle.DokkaTask + +val dokkaHtml by getting(DokkaTask::class) { outputDirectory.set(buildDir.resolve("dokka")) // Set module name displayed in the final output @@ -261,6 +263,9 @@ To generate the documentation, use the appropriate `dokka${format}` Gradle task: Some plugins can be configured separately using a plugin class and configuration class. For example: ```kotlin +import org.jetbrains.dokka.base.DokkaBase +import org.jetbrains.dokka.base.DokkaBaseConfiguration + pluginConfiguration<DokkaBase, DokkaBaseConfiguration> { customAssets = listOf(file("<path to asset>")) customStyleSheets = listOf(file("<path to custom stylesheet>")) @@ -268,6 +273,16 @@ pluginConfiguration<DokkaBase, DokkaBaseConfiguration> { ``` Keep in mind, that this only works when using a buildscript (with the configured plugin on classpath) since it is not possible to import plugin's class without it. +For example, you can add `DokkaBase` to gain access to aforementioned configuration: + +```kotlin +buildscript { + dependencies { + // classpath("<plugin coordinates>:<plugin version>") + classpath("org.jetbrains.dokka:dokka-base:1.5.0") + } +} +``` If you don't want to use a buildscript or use Kotlin version lower than 1.3.50 you can achieve the same behaviour manually: ```kotlin |