Skip to content

Commit

Permalink
Includes source links in kdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
ZacSweers committed Nov 21, 2023
1 parent 9f6b025 commit 09f70a7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,17 @@ subprojects {
.toURL()
)
}
sourceLink {
localDirectory.set(layout.projectDirectory.dir("src").asFile)
val relPath = rootProject.projectDir.toPath().relativize(projectDir.toPath())
remoteUrl.set(
providers.gradleProperty("POM_SCM_URL")
.map { scmUrl ->
URI("$scmUrl/tree/main/$relPath/src").toURL()
}
)
remoteLineSuffix.set("#L")
}
}
}

Expand Down

0 comments on commit 09f70a7

Please sign in to comment.