Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix sources not being linked when using Maven #3046

Merged
merged 2 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/topics/runners/dokka-maven.md
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
Expand Up @@ -383,7 +383,7 @@ abstract class AbstractDokkaMojo(private val defaultDokkaPlugins: List<Dependenc
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