Skip to content

Commit 2ecbe9b

Browse files
Update templates for Dokka 2.0.0 (#4718)
* update templates for Dokka 2.0.0 * refactor(builds): update release tag variables to use labels dynamically * refactor(build-config): streamline release tag usage across build pipelines - Replace hardcoded tag prefixes with dynamic release labels - Update vcs branch specs to include both heads and tags for all configurations - Align naming consistency for release properties * fix: adjusted dokka template styles * fix: adjusted navigation styles for dokka * fix: adjusted wrapper styles for dokka * fix: KTL-2222; API: The “Native” button is gray on coroutines * fix; KTL-2223: no bg in "Was this page helpful?" in dark mode --------- Co-authored-by: zoobestik <[email protected]>
1 parent 96a70b3 commit 2ecbe9b

20 files changed

+157
-112
lines changed

.teamcity/BuildParams.kt

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,30 @@
11
object BuildParams {
2-
const val DOKKA_TEMPLATES_VERSION = "1.9.10"
2+
const val DOKKA_TEMPLATES_VERSION = "2.0.0"
33

4-
const val KOTLINX_COROUTINES_RELEASE_TAG = "1.10.1"
4+
const val KOTLINX_COROUTINES_RELEASE_LABEL = "1.10.1"
5+
const val KOTLINX_COROUTINES_RELEASE_TAG = "whyoleg/dokka2-sync" // master
56
const val KOTLINX_COROUTINES_ID = "kotlinx.coroutines"
6-
const val KOTLINX_SERIALIZATION_RELEASE_TAG = "v1.8.1"
7+
8+
const val KOTLINX_SERIALIZATION_RELEASE_LABEL = "v1.8.1"
9+
const val KOTLINX_SERIALIZATION_RELEASE_TAG = "whyoleg/dokka2-sync" // master
710
const val KOTLINX_SERIALIZATION_ID = "kotlinx.serialization"
8-
const val KOTLINX_DATETIME_RELEASE_TAG = "v0.6.2"
11+
12+
const val KOTLINX_DATETIME_RELEASE_LABEL = "v0.6.2"
13+
const val KOTLINX_DATETIME_RELEASE_TAG = "whyoleg/dokka2-sync" // latest-release
914
const val KOTLINX_DATETIME_ID = "kotlinx-datetime"
10-
const val KOTLINX_IO_RELEASE_TAG = "0.7.0"
15+
16+
const val KOTLINX_IO_RELEASE_LABEL = "0.7.0" // KOTLINX_IO_RELEASE_TAG
17+
const val KOTLINX_IO_RELEASE_TAG = "whyoleg/dokka2-sync" // 0.6.0
1118
const val KOTLINX_IO_ID = "kotlinx-io"
12-
const val KOTLINX_METADATA_ID = "kotlinx-metadata-jvm"
19+
20+
const val KOTLIN_RELEASE_LABEL = "2.1.0"
21+
const val KOTLIN_RELEASE_TAG = "whyoleg/dokka2-sync-stdlib"
1322
const val KOTLIN_CORE_API_BUILD_ID = "Kotlin_KotlinRelease_2120_LibraryReferenceLatestDocs"
14-
const val KOTLIN_RELEASE_TAG = "v2.1.0"
23+
const val KOTLINX_METADATA_ID = "kotlinx-metadata-jvm"
24+
25+
const val KGP_RELEASE_LABEL = KOTLIN_RELEASE_LABEL
26+
const val KGP_RELEASE_TAG = "whyoleg/dokka2-sync"
1527
const val KGP_ID = "kotlin-gradle-plugin"
16-
val KGP_RELEASE_TAG = if (KOTLIN_RELEASE_TAG >= "v2.1.0") KOTLIN_RELEASE_TAG else "2.1.0"
1728

1829
const val SEARCH_APP_ID = "7961PKYRXV"
1930
const val SEARCH_INDEX_NAME = "prod_KOTLINLANG_WEBHELP"

.teamcity/builds/apiReferences/kgp/KotlinGradlePluginBuildApiReference.kt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
package builds.apiReferences.kgp
22

33
import BuildParams.KGP_ID
4-
import BuildParams.KGP_RELEASE_TAG
5-
import BuildParams.KOTLIN_RELEASE_TAG
4+
import BuildParams.KGP_RELEASE_LABEL
65
import builds.apiReferences.BuildApiPages
76
import builds.apiReferences.dependsOnDokkaTemplate
87
import builds.apiReferences.scriptBuildHtml
@@ -13,7 +12,7 @@ private const val KGP_API_OUTPUT_DIR = "libraries/tools/gradle/documentation/bui
1312
private const val KGP_API_TEMPLATES_DIR = "build/api-reference/templates"
1413

1514
object KotlinGradlePluginBuildApiReference : BuildApiPages(
16-
apiId = KGP_ID, releaseTag = KGP_RELEASE_TAG,
15+
apiId = KGP_ID, releaseTag = KGP_RELEASE_LABEL,
1716
pagesRoot = KGP_API_OUTPUT_DIR,
1817
vcsDefaultTrigger = { enabled = false },
1918
stepDropSnapshot = { null },
@@ -27,7 +26,7 @@ object KotlinGradlePluginBuildApiReference : BuildApiPages(
2726
#!/bin/bash
2827
set -e -u
2928
./gradlew :gradle:documentation:dokkaKotlinlangDocumentation -PdeployVersion=${
30-
KGP_RELEASE_TAG.removePrefix("v")
29+
KGP_RELEASE_LABEL
3130
} --no-daemon --no-configuration-cache
3231
""".trimIndent()
3332
}

.teamcity/builds/apiReferences/kotlinx/coroutines/KotlinxCoroutinesBuildApiReference.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package builds.apiReferences.kotlinx.coroutines
22

33
import BuildParams.KOTLINX_COROUTINES_ID
4-
import BuildParams.KOTLINX_COROUTINES_RELEASE_TAG
4+
import BuildParams.KOTLINX_COROUTINES_RELEASE_LABEL
55
import builds.apiReferences.BuildApiPages
66
import builds.apiReferences.dependsOnDokkaTemplate
77
import builds.apiReferences.vcsRoots.KotlinxCoroutines
88

99
object KotlinxCoroutinesBuildApiReference : BuildApiPages(
10-
apiId = KOTLINX_COROUTINES_ID, releaseTag = KOTLINX_COROUTINES_RELEASE_TAG, init = {
10+
apiId = KOTLINX_COROUTINES_ID, releaseTag = KOTLINX_COROUTINES_RELEASE_LABEL, init = {
1111
vcs {
1212
root(KotlinxCoroutines)
1313
}

.teamcity/builds/apiReferences/kotlinx/datetime/KotlinxDatetimeBuildApiReference.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package builds.apiReferences.kotlinx.datetime
22

33
import BuildParams.KOTLINX_DATETIME_ID
4-
import BuildParams.KOTLINX_DATETIME_RELEASE_TAG
4+
import BuildParams.KOTLINX_DATETIME_RELEASE_LABEL
55
import builds.apiReferences.BuildApiPages
66
import builds.apiReferences.dependsOnDokkaTemplate
77
import builds.apiReferences.scriptBuildHtml
@@ -12,7 +12,7 @@ private const val DOKKA_HTML_RESULT = "core/build/dokka/html"
1212

1313
object KotlinxDatetimeBuildApiReference : BuildApiPages(
1414
apiId = KOTLINX_DATETIME_ID,
15-
releaseTag = KOTLINX_DATETIME_RELEASE_TAG,
15+
releaseTag = KOTLINX_DATETIME_RELEASE_LABEL,
1616
pagesRoot = DOKKA_HTML_RESULT,
1717
stepDropSnapshot = {
1818
scriptDropSnapshot {

.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOBuildApiReference.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package builds.apiReferences.kotlinx.io
22

33
import BuildParams.KOTLINX_IO_ID
4-
import BuildParams.KOTLINX_IO_RELEASE_TAG
4+
import BuildParams.KOTLINX_IO_RELEASE_LABEL
55
import builds.apiReferences.BuildApiPages
66
import builds.apiReferences.dependsOnDokkaTemplate
77
import builds.apiReferences.scriptBuildHtml
@@ -10,7 +10,7 @@ import jetbrains.buildServer.configs.kotlin.buildSteps.ScriptBuildStep
1010

1111
object KotlinxIOBuildApiReference : BuildApiPages(
1212
apiId = KOTLINX_IO_ID,
13-
releaseTag = KOTLINX_IO_RELEASE_TAG.removePrefix("v"),
13+
releaseTag = KOTLINX_IO_RELEASE_LABEL.removePrefix("v"),
1414
stepDokkaVersionSync = {
1515
// TODO readme, and disable this step for other libs too
1616
null

.teamcity/builds/apiReferences/kotlinx/metadataJvm/KotlinxMetadataJvmBuildApiReference.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package builds.apiReferences.kotlinx.metadataJvm
22

33
import BuildParams.KOTLINX_METADATA_ID
4-
import BuildParams.KOTLIN_RELEASE_TAG
4+
import BuildParams.KOTLIN_RELEASE_LABEL
55
import builds.apiReferences.BuildApiPages
66
import builds.apiReferences.dependsOnDokkaTemplate
77
import builds.apiReferences.scriptBuildHtml
@@ -12,7 +12,7 @@ private const val LIB_DIR = "libraries/kotlinx-metadata/jvm"
1212

1313
object KotlinxMetadataJvmBuildApiReference : BuildApiPages(
1414
apiId = KOTLINX_METADATA_ID,
15-
releaseTag = KOTLIN_RELEASE_TAG,
15+
releaseTag = KOTLIN_RELEASE_LABEL,
1616
pagesRoot = "$LIB_DIR/build/dokka",
1717
vcsDefaultTrigger = { enabled = false },
1818
stepDropSnapshot = { null },
@@ -26,7 +26,7 @@ object KotlinxMetadataJvmBuildApiReference : BuildApiPages(
2626
scriptContent = """
2727
#!/bin/bash
2828
set -e -u
29-
./gradlew :kotlin-metadata-jvm:dokkaHtml -PdeployVersion=${KOTLIN_RELEASE_TAG.removePrefix("v")} --no-daemon --no-configuration-cache
29+
./gradlew :kotlin-metadata-jvm:dokkaHtml -PdeployVersion=${KOTLIN_RELEASE_LABEL} --no-daemon --no-configuration-cache
3030
""".trimIndent()
3131
}
3232
}

.teamcity/builds/apiReferences/kotlinx/serialization/KotlinxSerializationBuildApiReference.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package builds.apiReferences.kotlinx.serialization
22

33
import BuildParams.KOTLINX_SERIALIZATION_ID
4-
import BuildParams.KOTLINX_SERIALIZATION_RELEASE_TAG
4+
import BuildParams.KOTLINX_SERIALIZATION_RELEASE_LABEL
55
import builds.apiReferences.BuildApiPages
66
import builds.apiReferences.dependsOnDokkaTemplate
77
import builds.apiReferences.scriptBuildHtml
88
import builds.apiReferences.vcsRoots.KotlinxSerialization
99

1010
object KotlinxSerializationBuildApiReference : BuildApiPages(
11-
apiId = KOTLINX_SERIALIZATION_ID, releaseTag = KOTLINX_SERIALIZATION_RELEASE_TAG, init = {
11+
apiId = KOTLINX_SERIALIZATION_ID, releaseTag = KOTLINX_SERIALIZATION_RELEASE_LABEL, init = {
1212
vcs {
1313
root(KotlinxSerialization)
1414
}

.teamcity/builds/apiReferences/vcsRoots/Kotlin.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot
66
object Kotlin : GitVcsRoot({
77
name = "kotlin metadata vcs root"
88
url = "[email protected]:JetBrains/kotlin.git"
9-
branch = "refs/tags/$KOTLIN_RELEASE_TAG"
9+
branch = KOTLIN_RELEASE_TAG
1010
branchSpec = """
1111
+:refs/heads/(*)
1212
+:refs/tags/(*)

.teamcity/builds/apiReferences/vcsRoots/KotlinKGP.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot
66
object KotlinKGP : GitVcsRoot({
77
name = "kotlin Gradle Plugin vcs root"
88
url = "[email protected]:JetBrains/kotlin.git"
9-
branch = "refs/${if (KGP_RELEASE_TAG.startsWith("v")) "tags" else "heads"}/$KGP_RELEASE_TAG"
9+
branch = KGP_RELEASE_TAG
1010
branchSpec = """
1111
+:refs/heads/(*)
1212
+:refs/tags/(*)

.teamcity/builds/apiReferences/vcsRoots/KotlinxCoroutines.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
package builds.apiReferences.vcsRoots
22

3+
import BuildParams.KOTLINX_COROUTINES_RELEASE_TAG
34
import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot
45

56
object KotlinxCoroutines : GitVcsRoot({
67
name = "kotlinx.coroutines vcs root"
78
url = "[email protected]:Kotlin/kotlinx.coroutines.git"
8-
branch = "refs/heads/master"
9+
branch = KOTLINX_COROUTINES_RELEASE_TAG
910
branchSpec = """
10-
+:refs/heads/(*)
11-
""".trimIndent()
11+
+:refs/heads/(*)
12+
+:refs/tags/(*)
13+
""".trimIndent()
1214
useTagsAsBranches = true
1315
checkoutPolicy = AgentCheckoutPolicy.USE_MIRRORS
1416
authMethod = uploadedKey {

0 commit comments

Comments
 (0)