aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzim Muradov <azim.muradov.dev@gmail.com>2021-04-15 12:27:01 +0300
committerGitHub <noreply@github.com>2021-04-15 11:27:01 +0200
commit46b21186e77149f4f41d3b1e8c7d66e7e5e17108 (patch)
tree22de7b526bc30812e903c9384577b57e2cca158c
parent7bfab097f35f86bafbc2feff23e6658ad17da2ae (diff)
downloaddokka-46b21186e77149f4f41d3b1e8c7d66e7e5e17108.tar.gz
dokka-46b21186e77149f4f41d3b1e8c7d66e7e5e17108.tar.bz2
dokka-46b21186e77149f4f41d3b1e8c7d66e7e5e17108.zip
Fix several bugs in configuration examples in gradle user guide (#1831)
-rw-r--r--docs/src/doc/docs/user_guide/gradle/usage.md38
1 files changed, 19 insertions, 19 deletions
diff --git a/docs/src/doc/docs/user_guide/gradle/usage.md b/docs/src/doc/docs/user_guide/gradle/usage.md
index 203927d5..1473d928 100644
--- a/docs/src/doc/docs/user_guide/gradle/usage.md
+++ b/docs/src/doc/docs/user_guide/gradle/usage.md
@@ -149,7 +149,7 @@ dokkaHtml {
// By default, sourceRoots are taken from Kotlin Plugin and kotlinTasks, following roots will be appended to them
// Repeat for multiple sourceRoots
- sourceRoot.from(file("src"))
+ sourceRoots.from(file("src"))
// Specifies the location of the project source code on the Web.
// If provided, Dokka generates "source" links for each declaration.
@@ -181,7 +181,7 @@ dokkaHtml {
// Repeat for multiple links
externalDocumentationLink {
// Root URL of the generated documentation to link with. The trailing slash is required!
- url = URL("https://example.com/docs/")
+ url.set(URL("https://example.com/docs/"))
// If package-list file is located in non-standard location
// packageListUrl = URL("file:///home/user/localdocs/package-list")
@@ -199,7 +199,7 @@ dokkaHtml {
}
// Suppress a package
perPackageOption {
- matchingRegex.set(".*\.internal.*") // will match all .internal packages and sub-packages
+ matchingRegex.set(""".*\.internal.*""") // will match all .internal packages and sub-packages
suppress.set(true)
}
}
@@ -224,26 +224,26 @@ kotlin { // Kotlin Multiplatform plugin configuration
}
tasks.withType<DokkaTask>().configureEach {
- // custom output directory
- outputDirectory.set(buildDir.resolve("dokka"))
-
- // path to project documentation to display on all modules page
- includes.from(listOf(file("project_description.md")))
+ // custom output directory
+ outputDirectory.set(buildDir.resolve("dokka"))
- dokkaSourceSets {
- named("customNameMain") { // The same name as in Kotlin Multiplatform plugin, so the sources are fetched automatically
- includes.from("packages.md", "extra.md")
- samples.from("samples/basic.kt", "samples/advanced.kt")
- }
+ // path to project documentation to display on all modules page
+ includes.from(listOf(file("project_description.md")))
- register("differentName") { // Different name, so source roots must be passed explicitly
- displayName.set("JVM")
- platform.set(org.jetbrains.dokka.Platform.jvm)
- sourceRoots.from(kotlin.sourceSets.getByName("jvmMain").kotlin.srcDirs)
- sourceRoots.from(kotlin.sourceSets.getByName("commonMain").kotlin.srcDirs)
- }
+ dokkaSourceSets {
+ named("customNameMain") { // The same name as in Kotlin Multiplatform plugin, so the sources are fetched automatically
+ includes.from("packages.md", "extra.md")
+ samples.from("samples/basic.kt", "samples/advanced.kt")
+ }
+
+ register("differentName") { // Different name, so source roots must be passed explicitly
+ displayName.set("JVM")
+ platform.set(org.jetbrains.dokka.Platform.jvm)
+ sourceRoots.from(kotlin.sourceSets.getByName("jvmMain").kotlin.srcDirs)
+ sourceRoots.from(kotlin.sourceSets.getByName("commonMain").kotlin.srcDirs)
}
}
+}
```
!!! note