Skip to content

Commit

Permalink
Fix sources not being linked when using Maven (#3046)
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Oct 18, 2023
1 parent f225faf commit 8016c1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion docs/topics/runners/dokka-maven.md
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function in `kotlinx.coroutines`.
<configuration>
<sourceLinks>
<link>
<path>${project.basedir}/src</path>
<path>src</path>
<url>https://github.com/kotlin/dokka/tree/master/src</url>
<lineSuffix>#L</lineSuffix>
</link>
Expand All @@ -422,6 +422,9 @@ function in `kotlinx.coroutines`.
The path to the local source directory. The path must be relative to the root of the
current module.
</p>
<p>
Note: Only Unix based paths are allowed, Windows-style paths will throw an error.
</p>
</def>
<def title="url">
<p>
Expand Down
2 changes: 1 addition & 1 deletion runners/maven-plugin/src/main/kotlin/DokkaMojo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ public abstract class AbstractDokkaMojo(
skipEmptyPackages = skipEmptyPackages,
skipDeprecated = skipDeprecated,
jdkVersion = jdkVersion,
sourceLinks = sourceLinks.map { SourceLinkDefinitionImpl(it.path, URL(it.url), it.lineSuffix) }.toSet(),
sourceLinks = sourceLinks.map { SourceLinkDefinitionImpl(File(it.path).canonicalPath, URL(it.url), it.lineSuffix) }.toSet(),
perPackageOptions = perPackageOptions.map {
@Suppress("DEPRECATION") // for includeNonPublic, preserve backwards compatibility
PackageOptionsImpl(
Expand Down

0 comments on commit 8016c1f

Please sign in to comment.