Skip to content

Commit

Permalink
fix(KGP): use future kotlin release
Browse files Browse the repository at this point in the history
  • Loading branch information
zoobestik committed Nov 27, 2024
1 parent db78878 commit c06e83f
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
3 changes: 2 additions & 1 deletion .teamcity/BuildParams.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ object BuildParams {
const val KOTLINX_IO_RELEASE_TAG = "0.6.0"
const val KOTLINX_IO_ID = "kotlinx-io"
const val KOTLINX_METADATA_ID = "kotlinx-metadata-jvm"
const val KGP_ID = "kotlin-gradle-plugin"
const val KOTLIN_CORE_API_BUILD_ID = "Kotlin_KotlinRelease_2020_LibraryReferenceLatestDocs"
const val KOTLIN_RELEASE_TAG = "v2.0.21"
const val KGP_ID = "kotlin-gradle-plugin"
val KGP_RELEASE_TAG = if (KOTLIN_RELEASE_TAG >= "v2.1.0") KOTLIN_RELEASE_TAG else "2.1.0"

const val SEARCH_APP_ID = "7961PKYRXV"
const val SEARCH_INDEX_NAME = "prod_KOTLINLANG_WEBHELP"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package builds.apiReferences.kgp

import BuildParams.KGP_ID
import BuildParams.KGP_RELEASE_TAG
import BuildParams.KOTLIN_RELEASE_TAG
import builds.apiReferences.BuildApiPages
import builds.apiReferences.dependsOnDokkaTemplate
Expand All @@ -12,7 +13,7 @@ private const val KGP_API_OUTPUT_DIR = "libraries/tools/gradle/documentation/bui
private const val KGP_API_TEMPLATES_DIR = "build/api-reference/templates"

object KotlinGradlePluginBuildApiReference : BuildApiPages(
apiId = KGP_ID, releaseTag = KOTLIN_RELEASE_TAG,
apiId = KGP_ID, releaseTag = KGP_RELEASE_TAG,
pagesRoot = KGP_API_OUTPUT_DIR,
vcsDefaultTrigger = { enabled = false },
stepDropSnapshot = { null },
Expand All @@ -26,7 +27,7 @@ object KotlinGradlePluginBuildApiReference : BuildApiPages(
#!/bin/bash
set -e -u
./gradlew :gradle:documentation:dokkaKotlinlangDocumentation -PdeployVersion=${
KOTLIN_RELEASE_TAG.removePrefix("v")
KGP_RELEASE_TAG.removePrefix("v")
} --no-daemon --no-configuration-cache
""".trimIndent()
}
Expand Down
23 changes: 12 additions & 11 deletions .teamcity/builds/apiReferences/vcsRoots/KotlinKGP.kt
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
package builds.apiReferences.vcsRoots

import BuildParams.KGP_RELEASE_TAG
import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot

object KotlinKGP : GitVcsRoot({
name = "kotlin Gradle Plugin vcs root"
url = "[email protected]:JetBrains/kotlin.git"
branch = "rr/yahor/fix-api-reference-publication"
branchSpec = """
+:refs/heads/(*)
+:refs/tags/(*)
""".trimIndent()
useTagsAsBranches = true
authMethod = uploadedKey {
uploadedKey = "teamcity"
}
name = "kotlin Gradle Plugin vcs root"
url = "[email protected]:JetBrains/kotlin.git"
branch = "refs/${if (KGP_RELEASE_TAG.startsWith("v")) "tags" else "heads"}/$KGP_RELEASE_TAG"
branchSpec = """
+:refs/heads/(*)
+:refs/tags/(*)
""".trimIndent()
useTagsAsBranches = true
authMethod = uploadedKey {
uploadedKey = "teamcity"
}
})

0 comments on commit c06e83f

Please sign in to comment.