Skip to content

Commit

Permalink
Update external link URL to stdlib in code
Browse files Browse the repository at this point in the history
  • Loading branch information
vmishenev committed Nov 26, 2024
1 parent 7ba43d8 commit a1adf28
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,8 @@ class CliIntegrationTest : AbstractCliIntegrationTest() {
"packageListUrl": "https://docs.oracle.com/javase/8/docs/api/package-list"
},
{
"url": "https://kotlinlang.org/api/latest/jvm/stdlib/",
"packageListUrl": "https://kotlinlang.org/api/latest/jvm/stdlib/package-list"
"url": "https://kotlinlang.org/api/core/",
"packageListUrl": "https://kotlinlang.org/api/core/package-list"
}
""".trimIndent(),
globalPerPackageOptions = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import java.net.URL
* ```xml
* <externalDocumentationLinks>
* <link>
* <url>https://kotlinlang.org/api/latest/jvm/stdlib/</url>
* <url>https://kotlinlang.org/api/core/</url>
* <packageListUrl>file:/${project.basedir}/stdlib.package.list</packageListUrl>
* </link>
* </externalDocumentationLinks>
Expand All @@ -45,7 +45,7 @@ public class ExternalDocumentationLinkBuilder {
* Example:
*
* ```xml
* <url>https://kotlinlang.org/api/latest/jvm/stdlib/</url>
* <url>https://kotlinlang.org/api/core/</url>
* ```
*/
@Parameter(name = "url", required = true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class SampleRewriterTest {
sampleFile("/samples/_sampleUtils.kt", fqPackageName = "samples") {
+sampleUtilsKT
}
// the sample is from https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/is-not-empty.html
// the sample is from https://kotlinlang.org/api/core/kotlin.collections/is-not-empty.html
sampleFile("/samples/collections/collections.kt", fqPackageName = "samples.collections") {
+"""
import samples.*
Expand Down Expand Up @@ -192,7 +192,7 @@ class SampleRewriterTest {
sampleFile("/samples/_sampleUtils.kt", fqPackageName = "samples") {
+sampleUtilsKT
}
// the sample is from https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/indices.html
// the sample is from https://kotlinlang.org/api/core/kotlin.collections/indices.html
sampleFile("/samples/collections/collections.kt", fqPackageName = "samples.collections") {
+"""
import samples.*
Expand Down Expand Up @@ -253,7 +253,7 @@ class SampleRewriterTest {
sampleFile("/samples/_sampleUtils.kt", fqPackageName = "samples") {
+sampleUtilsKT
}
// the sample is from https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/last.html
// the sample is from https://kotlinlang.org/api/core/kotlin.collections/last.html
sampleFile("/samples/collections/collections.kt", fqPackageName = "samples.collections") {
+"""
import samples.*
Expand Down Expand Up @@ -323,7 +323,7 @@ class SampleRewriterTest {
sampleFile("/samples/_sampleUtils.kt", fqPackageName = "samples") {
+sampleUtilsKT
}
// the sample is from https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/element-at.html
// the sample is from https://kotlinlang.org/api/core/kotlin.collections/element-at.html
sampleFile("/samples/collections/collections.kt", fqPackageName = "samples.collections") {
+"""
import samples.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ public abstract class AbstractTest<M : TestMethods, T : TestBuilder<M>, D : Dokk
}

protected val stdlibExternalDocumentationLink: ExternalDocumentationLinkImpl = ExternalDocumentationLinkImpl(
URL("https://kotlinlang.org/api/latest/jvm/stdlib/"),
URL("https://kotlinlang.org/api/latest/jvm/stdlib/package-list")
URL("https://kotlinlang.org/api/core/"),
URL("https://kotlinlang.org/api/core/package-list")
)

public companion object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import kotlin.test.assertEquals
class DefaultExternalLocationProviderTest : BaseAbstractTest() {
private val testDataDir =
getTestDataDir("locationProvider").toAbsolutePath().toString().removePrefix("/").let { "/$it" }
private val kotlinLang = "https://kotlinlang.org/api/latest/jvm/stdlib"
private val kotlinLang = "https://kotlinlang.org/api/core"
private val packageListURL = URL("file://$testDataDir/stdlib-package-list")
private val configuration = dokkaConfiguration {
sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import kotlin.test.assertEquals
class Dokka010ExternalLocationProviderTest : BaseAbstractTest() {
private val testDataDir =
getTestDataDir("locationProvider").toAbsolutePath().toString().removePrefix("/").let { "/$it" }
private val kotlinLang = "https://kotlinlang.org/api/latest/jvm/stdlib"
private val kotlinLang = "https://kotlinlang.org/api/core"
private val packageListURL = URL("file://$testDataDir/old-package-list")
private val configuration = dokkaConfiguration {
sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class MultiModuleLinkingTest : BaseAbstractTest() {
getTestDataDir("locationProvider").toAbsolutePath().toString().removePrefix("/").let { "/$it" }
private val exampleDomain = "https://example.com"
private val packageListURL = URL("file://$testDataDir/multi-module-package-list")
private val kotlinLang = "https://kotlinlang.org/api/latest/jvm/stdlib"
private val kotlinLang = "https://kotlinlang.org/api/core"
private val stdlibPackageListURL = URL("file://$testDataDir/stdlib-package-list")
private val configuration = dokkaConfiguration {
sourceSets {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ class SignatureTest : BaseAbstractTest() {
}
renderingStage = { _, _ ->
val signature = writerPlugin.writer.renderedContent("root/example/elvis-like.html")
assertEquals(2, signature.select("a[href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html\"]").size)
assertEquals(2, signature.select("a[href=\"https://kotlinlang.org/api/core/kotlin/-any/index.html\"]").size)
signature.firstSignature().match(
"fun <", A("T"), "> ", A("elvisLike"),
"(",
Expand Down Expand Up @@ -743,7 +743,7 @@ class SignatureTest : BaseAbstractTest() {
renderingStage = { _, _ ->
assertEquals(
writerPlugin.writer.renderedContent("root/example/-data-class/index.html").lastSignature().html(),
"<span class=\"token keyword\">val </span><a href=\"arg.html\">arg</a><span class=\"token operator\">: </span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html\">String</a>"
"<span class=\"token keyword\">val </span><a href=\"arg.html\">arg</a><span class=\"token operator\">: </span><a href=\"https://kotlinlang.org/api/core/kotlin/-string/index.html\">String</a>"

)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ class JavadocLocationTest : BaseAbstractTest() {
)
val methodSignatureHtml = transformer.htmlForContentNode(methodWithTypealiasParam.signature, null)

val expectedSignatureHtml = "final <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>Unit</a> " +
val expectedSignatureHtml = "final <a href=https://kotlinlang.org/api/core/kotlin/-unit/index.html>Unit</a> " +
"<a href=javadoc/test/functionparams/FunctionParameters.html#withTypealias(javadoc.test.functionparams.StringTypealias)>withTypealias</a>" +
"(<a href=https://docs.oracle.com/javase/8/docs/api/java/lang/String.html>String</a> typeAliasParam)"

Expand Down Expand Up @@ -216,8 +216,8 @@ class JavadocLocationTest : BaseAbstractTest() {
)
val methodSignatureHtml = transformer.htmlForContentNode(methodWithVoidParam.signature, null)

val expectedSignatureHtml = "final &lt;T extends <a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html>Any</a>&gt; " +
"<a href=https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html>Unit</a> " +
val expectedSignatureHtml = "final &lt;T extends <a href=https://kotlinlang.org/api/core/kotlin/-any/index.html>Any</a>&gt; " +
"<a href=https://kotlinlang.org/api/core/kotlin/-unit/index.html>Unit</a> " +
"<a href=javadoc/test/functionparams/FunctionParameters.html#withDefinitelyNonNullableType(T)>withDefinitelyNonNullableType</a>" +
"(<a href=javadoc/test/functionparams/FunctionParameters.html#withDefinitelyNonNullableType(T)>T</a> definitelyNonNullable)"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class MultiplatformConfiguredCheckerTest : BaseAbstractTest() {
analysisPlatform = "jvm"
externalDocumentationLinks = listOf(
ExternalDocumentationLink("https://docs.oracle.com/javase/8/docs/api/"),
ExternalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
ExternalDocumentationLink("https://kotlinlang.org/api/core/")
)
}
sourceSet {
Expand All @@ -32,7 +32,7 @@ class MultiplatformConfiguredCheckerTest : BaseAbstractTest() {
analysisPlatform = "js"
externalDocumentationLinks = listOf(
ExternalDocumentationLink("https://docs.oracle.com/javase/8/docs/api/"),
ExternalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
ExternalDocumentationLink("https://kotlinlang.org/api/core/")
)
}
}
Expand All @@ -46,7 +46,7 @@ class MultiplatformConfiguredCheckerTest : BaseAbstractTest() {
analysisPlatform = "jvm"
externalDocumentationLinks = listOf(
ExternalDocumentationLink("https://docs.oracle.com/javase/8/docs/api/"),
ExternalDocumentationLink("https://kotlinlang.org/api/latest/jvm/stdlib/")
ExternalDocumentationLink("https://kotlinlang.org/api/core/")
)
}
}
Expand Down

0 comments on commit a1adf28

Please sign in to comment.