Skip to content

Commit d0656e4

Browse files
authored
Simplify Dokka source link configuration (#245)
1 parent 4f67d20 commit d0656e4

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

build-logic/src/main/kotlin/kotlinx/io/conventions/kotlinx-io-dokka.gradle.kts

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,10 @@ tasks.withType<DokkaTaskPartial>().configureEach {
1414
dokkaSourceSets.configureEach {
1515
includes.from("Module.md")
1616

17-
if (name.endsWith("Main")) {
18-
sourceLink {
19-
// sources are located in projectDir/PLATFORM/src
20-
// where the PLATFORM could be jvm, js, darwin, etc.
21-
// configuration happens in kotlinx-io-multiplatform.gradle.kts:KotlinSourceSet.configureSourceSet
22-
val platform = name.dropLast(4)
23-
val relPath = rootProject.projectDir.toPath().relativize(projectDir.toPath())
24-
localDirectory.set(projectDir.resolve("$platform/src"))
25-
remoteUrl.set(URL("https://github.com/kotlin/kotlinx-io/tree/master/$relPath/$platform/src"))
26-
remoteLineSuffix.set("#L")
27-
}
17+
sourceLink {
18+
localDirectory.set(rootDir)
19+
remoteUrl.set(URL("https://github.com/kotlin/kotlinx-io/tree/master"))
20+
remoteLineSuffix.set("#L")
2821
}
2922
}
3023
}

0 commit comments

Comments
 (0)