aboutsummaryrefslogtreecommitdiff
path: root/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-04-25 14:42:39 +0200
committerGitHub <noreply@github.com>2023-04-25 14:42:39 +0200
commit5315c6a8cf2e08947dc013fdd60f293f76a0a1bd (patch)
tree6d8ff27c77651746468736191fe7b5da9804aa87 /examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
parent227eb28cda2ed7ea0b274f6ae2e8d4769421cd22 (diff)
downloaddokka-5315c6a8cf2e08947dc013fdd60f293f76a0a1bd.tar.gz
dokka-5315c6a8cf2e08947dc013fdd60f293f76a0a1bd.tar.bz2
dokka-5315c6a8cf2e08947dc013fdd60f293f76a0a1bd.zip
Simplify multimodule source link configuration example (#2974)
Diffstat (limited to 'examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts')
-rw-r--r--examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts10
1 files changed, 2 insertions, 8 deletions
diff --git a/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts b/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
index 7fb7c115..3563ecca 100644
--- a/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
+++ b/examples/gradle/dokka-multimodule-example/parentProject/build.gradle.kts
@@ -19,18 +19,12 @@ subprojects {
Visibility.PROTECTED
))
- // In multi-project builds, `remoteUrl` must point to that project's dir specifically, so if you
- // want to configure sourceLinks at once in `subprojects {}`, you have to find the relative path.
- // Alternatively, you can move this configuration up into subproject build scripts,
- // and just hardcode the exact paths as demonstrated in the basic dokka-gradle-example.
- //
// Read docs for more details: https://kotlinlang.org/docs/dokka-gradle.html#source-link-configuration
sourceLink {
val exampleDir = "https://github.com/Kotlin/dokka/tree/master/examples/gradle/dokka-multimodule-example"
- val projectRelativePath = rootProject.projectDir.toPath().relativize(projectDir.toPath())
- localDirectory.set(projectDir.resolve("src"))
- remoteUrl.set(URL("$exampleDir/$projectRelativePath/src"))
+ localDirectory.set(rootProject.projectDir)
+ remoteUrl.set(URL("$exampleDir"))
remoteLineSuffix.set("#L")
}
}