diff --git a/.teamcity/BuildParams.kt b/.teamcity/BuildParams.kt index 5f6eb84bd95..97ba257f1f4 100644 --- a/.teamcity/BuildParams.kt +++ b/.teamcity/BuildParams.kt @@ -4,6 +4,7 @@ object BuildParams { const val KOTLINX_COROUTINES_RELEASE_TAG = "1.9.0-RC" const val KOTLINX_SERIALIZATION_RELEASE_TAG = "v1.7.2" const val KOTLINX_DATETIME_RELEASE_TAG = "v0.6.0" + const val KOTLINX_IO_RELEASE_TAG = "0.5.2" const val KOTLIN_RELEASE_TAG = "v2.0.20" const val SEARCH_APP_ID = "7961PKYRXV" diff --git a/.teamcity/builds/apiReferences/BuildApiReferencesProject.kt b/.teamcity/builds/apiReferences/BuildApiReferencesProject.kt index 2876ea2b580..9d328b0da7f 100644 --- a/.teamcity/builds/apiReferences/BuildApiReferencesProject.kt +++ b/.teamcity/builds/apiReferences/BuildApiReferencesProject.kt @@ -6,6 +6,9 @@ import builds.apiReferences.kotlinx.coroutines.KotlinxCoroutinesPrepareDokkaTemp import builds.apiReferences.kotlinx.datetime.KotlinxDatetimeBuildApiReference import builds.apiReferences.kotlinx.datetime.KotlinxDatetimeBuildSearchIndex import builds.apiReferences.kotlinx.datetime.KotlinxDatetimePrepareDokkaTemplates +import builds.apiReferences.kotlinx.io.KotlinxIOBuildApiReference +import builds.apiReferences.kotlinx.io.KotlinxIOBuildSearchIndex +import builds.apiReferences.kotlinx.io.KotlinxIOPrepareDokkaTemplates import builds.apiReferences.kotlinx.metadataJvm.KotlinxMetadataJvmBuildApiReference import builds.apiReferences.kotlinx.metadataJvm.KotlinxMetadataJvmBuildSearchIndex import builds.apiReferences.kotlinx.metadataJvm.KotlinxMetadataJvmPrepareDokkaTemplates @@ -21,6 +24,7 @@ import builds.apiReferences.templates.PrepareDokkaTemplate import builds.apiReferences.vcsRoots.KotlinMetadataJvm import builds.apiReferences.vcsRoots.KotlinxCoroutines import builds.apiReferences.vcsRoots.KotlinxDatetime +import builds.apiReferences.vcsRoots.KotlinxIO import builds.apiReferences.vcsRoots.KotlinxSerialization import jetbrains.buildServer.configs.kotlin.Project @@ -32,6 +36,10 @@ object BuildApiReferencesProject : Project({ buildType(KotlinxDatetimeBuildSearchIndex) buildType(KotlinxDatetimePrepareDokkaTemplates) + buildType(KotlinxIOBuildApiReference) + buildType(KotlinxIOBuildSearchIndex) + buildType(KotlinxIOPrepareDokkaTemplates) + buildType(KotlinxSerializationBuildApiReference) buildType(KotlinxSerializationBuildSearchIndex) buildType(KotlinxSerializationPrepareDokkaTemplates) @@ -51,6 +59,7 @@ object BuildApiReferencesProject : Project({ vcsRoot(KotlinxSerialization) vcsRoot(KotlinxCoroutines) vcsRoot(KotlinxDatetime) + vcsRoot(KotlinxIO) vcsRoot(KotlinMetadataJvm) template(PrepareDokkaTemplate) diff --git a/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOBuildApiReference.kt b/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOBuildApiReference.kt new file mode 100644 index 00000000000..2ada2d9c956 --- /dev/null +++ b/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOBuildApiReference.kt @@ -0,0 +1,52 @@ +package builds.apiReferences.kotlinx.io + +import BuildParams.KOTLINX_IO_RELEASE_TAG +import builds.apiReferences.dependsOnDokkaTemplate +import builds.apiReferences.templates.BuildApiReference +import builds.apiReferences.templates.buildDokkaHTML +import builds.apiReferences.templates.scriptDokkaVersionSync +import builds.apiReferences.templates.scriptDropSnapshot +import jetbrains.buildServer.configs.kotlin.BuildType +import jetbrains.buildServer.configs.kotlin.buildSteps.script + +object KotlinxIOBuildApiReference : BuildType({ + name = "kotlinx-io API reference" + + templates(BuildApiReference) + + artifactRules = "build/dokka/htmlMultiModule/** => pages.zip" + + params { + param("release.tag", KOTLINX_IO_RELEASE_TAG) + } + + vcs { + root(builds.apiReferences.vcsRoots.KotlinxIO) + } + + dependencies { + dependsOnDokkaTemplate(KotlinxIOPrepareDokkaTemplates) + } + + steps { + scriptDropSnapshot { + enabled = false // TODO readme, and disable this step for other libs too + } + scriptDokkaVersionSync { + enabled = false // TODO readme, and disable this step for other libs too + } + buildDokkaHTML { + enabled = false // TODO add useGradlewWrapper = true + } + script { + name = "build api reference" + scriptContent = """ + #!/bin/bash + + set -e -u + + ./gradlew dokkaHtmlMultiModule --no-daemon --no-configuration-cache + """.trimIndent() + } + } +}) diff --git a/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOBuildSearchIndex.kt b/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOBuildSearchIndex.kt new file mode 100644 index 00000000000..00f7b8046f9 --- /dev/null +++ b/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOBuildSearchIndex.kt @@ -0,0 +1,20 @@ +package builds.apiReferences.kotlinx.io + +import builds.apiReferences.dependsOnDokkaPagesJson +import builds.apiReferences.templates.BuildApiReferenceSearchIndex +import jetbrains.buildServer.configs.kotlin.BuildType + +object KotlinxIOBuildSearchIndex: BuildType({ + name = "Build search index for kotlinx-io" + + templates(BuildApiReferenceSearchIndex) + + params { + param("env.ALGOLIA_INDEX_NAME", "kotlinx-io") + param("env.API_REFERENCE_URL", "/api/kotlinx-io") + } + + dependencies { + dependsOnDokkaPagesJson(KotlinxIOBuildApiReference) + } +}) diff --git a/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOPrepareDokkaTemplates.kt b/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOPrepareDokkaTemplates.kt new file mode 100644 index 00000000000..f2671d53547 --- /dev/null +++ b/.teamcity/builds/apiReferences/kotlinx/io/KotlinxIOPrepareDokkaTemplates.kt @@ -0,0 +1,14 @@ +package builds.apiReferences.kotlinx.io + +import builds.apiReferences.templates.PrepareDokkaTemplate +import jetbrains.buildServer.configs.kotlin.BuildType + +object KotlinxIOPrepareDokkaTemplates: BuildType({ + name = "Prepare dokka templates for kotlinx-io" + + templates(PrepareDokkaTemplate) + + params { + param("env.ALGOLIA_INDEX_NAME", "kotlinx-io") + } +}) diff --git a/.teamcity/builds/apiReferences/templates/BuildApiReference.kt b/.teamcity/builds/apiReferences/templates/BuildApiReference.kt index 6274e2da47b..d223cf2522a 100644 --- a/.teamcity/builds/apiReferences/templates/BuildApiReference.kt +++ b/.teamcity/builds/apiReferences/templates/BuildApiReference.kt @@ -43,6 +43,7 @@ fun BuildSteps.buildDokkaHTML(block: GradleBuildStep.() -> Unit) = step( id = "step-build-dokka-html-id" name = "Build dokka html" tasks = "dokkaHtmlMultiModule" + useGradleWrapper = true }.apply(block), ) diff --git a/.teamcity/builds/apiReferences/vcsRoots/KotlinxIO.kt b/.teamcity/builds/apiReferences/vcsRoots/KotlinxIO.kt new file mode 100644 index 00000000000..2c98e05766c --- /dev/null +++ b/.teamcity/builds/apiReferences/vcsRoots/KotlinxIO.kt @@ -0,0 +1,18 @@ +package builds.apiReferences.vcsRoots + +import BuildParams.KOTLINX_IO_RELEASE_TAG +import jetbrains.buildServer.configs.kotlin.vcs.GitVcsRoot + +object KotlinxIO : GitVcsRoot({ + name = "kotlinx-io vcs root" + url = "git@github.com:Kotlin/kotlinx-io.git" + branch = "refs/heads/ktl-1576-kotlinlang-api-ref" + branchSpec = """ + +:refs/heads/(*) + +:refs/tags/(*) + """.trimIndent() + useTagsAsBranches = true + authMethod = uploadedKey { + uploadedKey = "teamcity" + } +})