Skip to content

Commit 704610d

Browse files
authored
Simplify Dokka source link configuration (#2524)
1 parent 7201ab3 commit 704610d

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

gradle/dokka.gradle

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ def documentedSubprojects = ["kotlinx-serialization-core",
1313
"kotlinx-serialization-hocon",
1414
"kotlinx-serialization-protobuf"]
1515

16-
def jvmOnlySubprojects = ["kotlinx-serialization-hocon"]
17-
1816
subprojects {
1917
if (!(name in documentedSubprojects)) return
2018
apply plugin: 'org.jetbrains.dokka'
@@ -77,12 +75,8 @@ subprojects {
7775
}
7876

7977
sourceLink {
80-
// sources directory for MPP configured in gradle/configure-source-sets.gradle:61
81-
// in short - kotlin.srcDirs = ["$sourceSet.name/src"]
82-
def sourcesPath = project.name in jvmOnlySubprojects ? "src/main/kotlin" : "$name/src"
83-
def relProjectPath = rootProject.projectDir.toPath().relativize(projectDir.toPath())
84-
localDirectory.set(file(sourcesPath))
85-
remoteUrl.set(new URL("https://github.com/Kotlin/kotlinx.serialization/tree/master/$relProjectPath/$sourcesPath"))
78+
localDirectory.set(rootDir)
79+
remoteUrl.set(new URL("https://github.com/Kotlin/kotlinx.serialization/tree/master"))
8680
remoteLineSuffix.set("#L")
8781
}
8882
}

0 commit comments

Comments
 (0)