Skip to content

Commit

Permalink
Includes source links in dokka docs (#646)
Browse files Browse the repository at this point in the history
Now they're clickable directly from the dokka docs (see the "source"
link in the screenshot)

<img width="1512" alt="Screenshot 2023-11-21 at 12 45 21 PM"
src="https://github.com/slackhq/slack-gradle-plugin/assets/1361086/b79127b5-4ac2-4421-b302-78d86bece2cd">


<!--
  ⬆ Put your description above this! ⬆

  Please be descriptive and detailed.
  
Please read our [Contributing
Guidelines](https://github.com/tinyspeck/slack-gradle-plugin/blob/main/.github/CONTRIBUTING.md)
and [Code of Conduct](https://slackhq.github.io/code-of-conduct).

Don't worry about deleting this, it's not visible in the PR!
-->
  • Loading branch information
ZacSweers authored Nov 21, 2023
1 parent 9f6b025 commit 6aafe0a
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 6aafe0a

Please sign in to comment.