Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Smileslime47 authored Sep 13, 2023
2 parents caa31a9 + 0bf2e0f commit 2ffa3b5
Show file tree
Hide file tree
Showing 237 changed files with 12,069 additions and 5,284 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate-events-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [ master ]

jobs:
validate_user_groups_data:
validate_community_events_data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/verify-samples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ on:
pull_request:
branches: [ master ]
jobs:
build:
verify_samples:
runs-on: ubuntu-latest
steps:
- name: Set up JDK
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
java-version: '17'
distribution: 'zulu'
- name: Run a verifier
uses: AlexanderPrendota/kotlin-samples-verifier@master
with:
Expand Down
4 changes: 3 additions & 1 deletion .idea/kotlin-web-site.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions .teamcity/BuildParams.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
object BuildParams {
const val KOTLINX_COROUTINES_RELEASE_TAG = "1.6.4"
const val KOTLINX_SERIALIZATION_RELEASE_TAG = "v1.5.0"
const val DOKKA_TEMPLATES_VERSION = "1.9.0-dev-218"

const val KOTLINX_COROUTINES_RELEASE_TAG = "1.7.1"
const val KOTLINX_SERIALIZATION_RELEASE_TAG = "v1.6.0"
const val KOTLINX_DATETIME_RELEASE_TAG = "v0.4.0"
const val KOTLINX_METADATA_JVM_RELEASE_TAG = "v0.7.0"

const val SEARCH_APP_ID = "7961PKYRXV"
const val SEARCH_INDEX_NAME = "prod_KOTLINLANG_WEBHELP"
Expand Down
9 changes: 9 additions & 0 deletions .teamcity/builds/apiReferences/BuildApiReferencesProject.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ import builds.apiReferences.kotlinx.datetime.KotlinxDatetimePrepareDokkaTemplate
import builds.apiReferences.kotlinx.serialization.KotlinxSerializationBuildApiReference
import builds.apiReferences.kotlinx.serialization.KotlinxSerializationBuildSearchIndex
import builds.apiReferences.kotlinx.serialization.KotlinxSerializationPrepareDokkaTemplates
import builds.apiReferences.kotlinx.metadataJvm.KotlinxMetadataJvmBuildApiReference
import builds.apiReferences.kotlinx.metadataJvm.KotlinxMetadataJvmBuildSearchIndex
import builds.apiReferences.kotlinx.metadataJvm.KotlinxMetadataJvmPrepareDokkaTemplates
import builds.apiReferences.stdlib.BuildStdlibApiReference
import builds.apiReferences.stdlib.StdlibPrepareDokkaTemplates
import builds.apiReferences.templates.BuildApiReference
Expand All @@ -17,6 +20,7 @@ import builds.apiReferences.templates.PrepareDokkaTemplate
import builds.apiReferences.vcsRoots.KotlinxCoroutines
import builds.apiReferences.vcsRoots.KotlinxSerialization
import builds.apiReferences.vcsRoots.KotlinxDatetime
import builds.apiReferences.vcsRoots.Kotlin
import jetbrains.buildServer.configs.kotlin.Project

object BuildApiReferencesProject : Project({
Expand All @@ -35,12 +39,17 @@ object BuildApiReferencesProject : Project({
buildType(KotlinxCoroutinesBuildSearchIndex)
buildType(KotlinxCoroutinesPrepareDokkaTemplates)

buildType(KotlinxMetadataJvmBuildApiReference)
buildType(KotlinxMetadataJvmBuildSearchIndex)
buildType(KotlinxMetadataJvmPrepareDokkaTemplates)

buildType(BuildStdlibApiReference)
buildType(StdlibPrepareDokkaTemplates)

vcsRoot(KotlinxSerialization)
vcsRoot(KotlinxCoroutines)
vcsRoot(KotlinxDatetime)
vcsRoot(Kotlin)

template(PrepareDokkaTemplate)
template(BuildApiReference)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
package builds.apiReferences.kotlinx.coroutines

import BuildParams.KOTLINX_COROUTINES_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.templates.BuildApiReference
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.triggers.vcs

object KotlinxCoroutinesBuildApiReference: BuildType({
name = "kotlinx.coroutines API reference"
object KotlinxCoroutinesBuildApiReference : BuildType({
name = "kotlinx.coroutines API reference"

templates(BuildApiReference)
templates(BuildApiReference)

params {
param("release.tag", BuildParams.KOTLINX_COROUTINES_RELEASE_TAG)
}

vcs {
root(builds.apiReferences.vcsRoots.KotlinxCoroutines)
}
params {
param("release.tag", KOTLINX_COROUTINES_RELEASE_TAG)
}

triggers {
vcs {
branchFilter = "+:<default>"
root(builds.apiReferences.vcsRoots.KotlinxCoroutines)
}
}

dependencies {
dependsOnDokkaTemplate(KotlinxCoroutinesPrepareDokkaTemplates)
}
})
dependencies {
dependsOnDokkaTemplate(KotlinxCoroutinesPrepareDokkaTemplates)
}
})
Original file line number Diff line number Diff line change
@@ -1,52 +1,40 @@
package builds.apiReferences.kotlinx.datetime

import BuildParams.KOTLINX_DATETIME_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.templates.BuildApiReference
import builds.apiReferences.templates.buildDokkaHTML
import builds.apiReferences.templates.scriptDropSnapshot
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.buildSteps.gradle
import jetbrains.buildServer.configs.kotlin.buildSteps.script
import jetbrains.buildServer.configs.kotlin.triggers.vcs

object KotlinxDatetimeBuildApiReference : BuildType({
name = "kotlinx-datetime API reference"
name = "kotlinx-datetime API reference"

artifactRules = "core/build/dokka/html/** => pages.zip"
templates(BuildApiReference)

steps {
script {
name = "Drop SNAPSHOT word for deploy"
scriptContent = """
#!/bin/bash
sed -i -E "s/versionSuffix=SNAPSHOT//gi" ./gradle.properties
""".trimIndent()
dockerImage = "debian"
}
gradle {
name = "Build dokka html"
tasks = ":kotlinx-datetime:dokkaHtml"
useGradleWrapper = true
}
}

params {
param("release.tag", BuildParams.KOTLINX_DATETIME_RELEASE_TAG)
param("teamcity.vcsTrigger.runBuildInNewEmptyBranch", "true")
}
artifactRules = "core/build/dokka/html/** => pages.zip"

vcs {
root(builds.apiReferences.vcsRoots.KotlinxDatetime)
}
params {
param("release.tag", KOTLINX_DATETIME_RELEASE_TAG)
}

triggers {
vcs {
branchFilter = "+:<default>"
root(builds.apiReferences.vcsRoots.KotlinxDatetime)
}
}

requirements {
doesNotContain("teamcity.agent.name", "windows")
}
dependencies {
dependsOnDokkaTemplate(KotlinxDatetimePrepareDokkaTemplates, "core/dokka-templates")
}

dependencies {
dependsOnDokkaTemplate(KotlinxDatetimePrepareDokkaTemplates, "core/dokka-templates")
}
steps {
scriptDropSnapshot {
scriptContent = """
#!/bin/bash
sed -i -E "s/versionSuffix=SNAPSHOT//gi" ./gradle.properties
""".trimIndent()
}
buildDokkaHTML {
tasks = ":kotlinx-datetime:dokkaHtml"
}
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
package builds.apiReferences.kotlinx.metadataJvm

import BuildParams.KOTLINX_METADATA_JVM_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.templates.*
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.buildSteps.script

object KotlinxMetadataJvmBuildApiReference : BuildType({
name = "kotlinx-metadata-jvm API reference"

templates(BuildApiReference)

artifactRules = "libraries/kotlinx-metadata/jvm/build/dokka/** => pages.zip"

params {
param("release.tag", KOTLINX_METADATA_JVM_RELEASE_TAG)
}

triggers {
vcsDefaultTrigger {
enabled = false
}
}

vcs {
root(builds.apiReferences.vcsRoots.Kotlin)
}

steps {
scriptDropSnapshot {
enabled = false
}
buildDokkaHTML {
enabled = false
}
scriptDokkaVersionSync {
scriptContent = """
#!/bin/bash
set -e
set +x
set -o pipefail
set -u
# update Dokka version
sed -i -E "s/dokka ?= ?\"[0-9\.]+\"/dokka = \"%DOKKA_TEMPLATES_VERSION%\"/gi" ./gradle/libs.versions.toml
# Define the replacement string
replacement="maven(url = \"$DOKKA_SPACE_REPO\")\nmavenCentral"
# List of kts files to apply the command on
files=(
"./build.gradle.kts"
"./repo/gradle-settings-conventions/settings.gradle.kts"
"./repo/gradle-build-conventions/buildsrc-compat/build.gradle.kts"
)
# Loop through the files and apply the sed command
for file in "${'$'}{files[@]}"; do
sed -i -E "s|mavenCentral|${'$'}replacement|" "${'$'}file"
done
# modify Groovy file
sed -i -E "s|mavenCentral|maven \{ url \"$DOKKA_SPACE_REPO\" \}\nmavenCentral|" ./settings.gradle
# add Dokka dev artifacts to the list of trusted ones
sed -i -E "s|<trusted-artifacts>|<trusted-artifacts>\n<trust group=\"org.jetbrains.dokka\" />\n|" ./gradle/verification-metadata.xml
""".trimIndent()
}
script {
name = "build api reference"
scriptContent = """
./gradlew :kotlinx-metadata-jvm:dokkaHtml -PkotlinxMetadataDeployVersion=${KOTLINX_METADATA_JVM_RELEASE_TAG}
""".trimIndent()
}
}

dependencies {
dependsOnDokkaTemplate(KotlinxMetadataJvmPrepareDokkaTemplates, "libraries/kotlinx-metadata/jvm/dokka-templates")
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package builds.apiReferences.kotlinx.metadataJvm

import builds.apiReferences.dependsOnDokkaPagesJson
import builds.apiReferences.templates.BuildApiReferenceSearchIndex
import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxMetadataJvmBuildSearchIndex: BuildType({
name = "Build search index for kotlinx-metadata-jvm"

templates(BuildApiReferenceSearchIndex)

params {
param("env.ALGOLIA_INDEX_NAME", "kotlinx-metadata-jvm")
param("env.API_REFERENCE_URL", "/api/kotlinx-metadata-jvm")
}

dependencies {
dependsOnDokkaPagesJson(KotlinxMetadataJvmBuildApiReference)
}
})
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package builds.apiReferences.kotlinx.metadataJvm

import builds.apiReferences.templates.PrepareDokkaTemplate
import jetbrains.buildServer.configs.kotlin.BuildType

object KotlinxMetadataJvmPrepareDokkaTemplates: BuildType({
name = "Prepare dokka templates for kotlinx-metadata-jvm"

templates(PrepareDokkaTemplate)

params {
param("env.ALGOLIA_INDEX_NAME", "kotlinx-metadata-jvm")
}
})
Original file line number Diff line number Diff line change
@@ -1,30 +1,24 @@
package builds.apiReferences.kotlinx.serialization

import BuildParams.KOTLINX_SERIALIZATION_RELEASE_TAG
import builds.apiReferences.dependsOnDokkaTemplate
import builds.apiReferences.templates.BuildApiReference
import jetbrains.buildServer.configs.kotlin.BuildType
import jetbrains.buildServer.configs.kotlin.triggers.vcs

object KotlinxSerializationBuildApiReference : BuildType({
name = "kotlinx.serialization API reference"
name = "kotlinx.serialization API reference"

templates(BuildApiReference)
templates(BuildApiReference)

params {
param("release.tag", BuildParams.KOTLINX_SERIALIZATION_RELEASE_TAG)
}

vcs {
root(builds.apiReferences.vcsRoots.KotlinxSerialization)
}
params {
param("release.tag", KOTLINX_SERIALIZATION_RELEASE_TAG)
}

triggers {
vcs {
branchFilter = "+:<default>"
root(builds.apiReferences.vcsRoots.KotlinxSerialization)
}
}

dependencies {
dependsOnDokkaTemplate(KotlinxSerializationPrepareDokkaTemplates)
}
dependencies {
dependsOnDokkaTemplate(KotlinxSerializationPrepareDokkaTemplates)
}
})
Loading

0 comments on commit 2ffa3b5

Please sign in to comment.