diff options
author | sebastian.sellmair <sebastian.sellmair@jetbrains.com> | 2020-08-11 14:10:37 +0200 |
---|---|---|
committer | Sebastian Sellmair <34319766+sellmair@users.noreply.github.com> | 2020-08-14 17:51:11 +0200 |
commit | 334619d42d3c26379429ea8cdab13b28c87c159e (patch) | |
tree | 928a933b0a914f62a8a45acbf6b3cb59ecf2f728 /plugins/base/src | |
parent | 33d962a55a559aa706649c29d9dd85d724cc37d9 (diff) | |
download | dokka-334619d42d3c26379429ea8cdab13b28c87c159e.tar.gz dokka-334619d42d3c26379429ea8cdab13b28c87c159e.tar.bz2 dokka-334619d42d3c26379429ea8cdab13b28c87c159e.zip |
Refine and test `GradleSourceLinkBuilder` and SourceLinkDefinition API
Diffstat (limited to 'plugins/base/src')
-rw-r--r-- | plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt | 4 | ||||
-rw-r--r-- | plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt | 12 |
2 files changed, 8 insertions, 8 deletions
diff --git a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt index f0e62f11..c8ef7cbc 100644 --- a/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt +++ b/plugins/base/src/main/kotlin/transformers/pages/sourcelinks/SourceLinksTransformer.kt @@ -123,8 +123,8 @@ class SourceLinksTransformer(val context: DokkaContext, val builder: PageContent data class SourceLink(val path: String, val url: String, val lineSuffix: String?, val sourceSetData: DokkaSourceSet) { constructor(sourceLinkDefinition: DokkaConfiguration.SourceLinkDefinition, sourceSetData: DokkaSourceSet) : this( - sourceLinkDefinition.path, sourceLinkDefinition.url, sourceLinkDefinition.lineSuffix, sourceSetData + sourceLinkDefinition.localDirectory, sourceLinkDefinition.remoteUrl, sourceLinkDefinition.remoteLineSuffix, sourceSetData ) } -fun ContentGroup.hasTabbedContent(): Boolean = children.any { it.hasStyle(ContentStyle.TabbedContent) }
\ No newline at end of file +fun ContentGroup.hasTabbedContent(): Boolean = children.any { it.hasStyle(ContentStyle.TabbedContent) } diff --git a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt index a8fc9f6d..40c87b75 100644 --- a/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt +++ b/plugins/base/src/test/kotlin/linkableContent/LinkableContentTest.kt @@ -69,9 +69,9 @@ class LinkableContentTest : AbstractCoreTest() { sourceRoots = listOf("$testDataDir/jsMain/kotlin") sourceLinks = listOf( SourceLinkDefinitionImpl( - path = "jsMain/kotlin", - url = "https://github.com/user/repo/tree/master/src/jsMain/kotlin", - lineSuffix = "#L" + localDirectory = "jsMain/kotlin", + remoteUrl = "https://github.com/user/repo/tree/master/src/jsMain/kotlin", + remoteLineSuffix = "#L" ) ) name = "js" @@ -82,9 +82,9 @@ class LinkableContentTest : AbstractCoreTest() { sourceRoots = listOf("$testDataDir/jvmMain/kotlin") sourceLinks = listOf( SourceLinkDefinitionImpl( - path = "jvmMain/kotlin", - url = "https://github.com/user/repo/tree/master/src/jvmMain/kotlin", - lineSuffix = "#L" + localDirectory = "jvmMain/kotlin", + remoteUrl = "https://github.com/user/repo/tree/master/src/jvmMain/kotlin", + remoteLineSuffix = "#L" ) ) name = "jvm" |