-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4560 from JetBrains/core-api-r3
Core API: Release reference with dokka 2+
- Loading branch information
Showing
74 changed files
with
6,504 additions
and
6,757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
package builds | ||
|
||
import BuildParams.SEARCH_APP_ID | ||
import builds.kotlinlang.buidTypes.PageViews | ||
import jetbrains.buildServer.configs.kotlin.BuildSteps | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
import jetbrains.buildServer.configs.kotlin.buildSteps.ScriptBuildStep | ||
import vcsRoots.KotlinLangOrg | ||
|
||
private const val SCRIPT_PATH = "scripts/doindex"; | ||
|
||
fun BuildSteps.scriptDistAnalyze(block: ScriptBuildStep.() -> Unit) = step( | ||
ScriptBuildStep { | ||
name = "Run dist/ analyzer" | ||
//language=bash | ||
scriptContent = """ | ||
#!/bin/sh | ||
set -e | ||
npm install | ||
npm run generate-metadata | ||
""".trimIndent() | ||
dockerImage = "node:22-alpine" | ||
workingDir = SCRIPT_PATH | ||
dockerPull = true | ||
|
||
block() | ||
} | ||
) | ||
|
||
open class TemplateSearchIndex(init: BuildType.() -> Unit) : BuildType({ | ||
artifactRules = """ | ||
reports/** => reports.zip | ||
""".trimIndent() | ||
|
||
requirements { | ||
doesNotContain("docker.server.osType", "windows") | ||
} | ||
|
||
params { | ||
param("env.NODE_OPTIONS", "--max-old-space-size=32768") | ||
|
||
param("env.WH_SEARCH_USER", SEARCH_APP_ID) | ||
param("env.WH_SEARCH_WRITE_KEY", "%ALGOLIA_WRITE_API_KEY%") | ||
param("env.WH_SKIP_PREFILTER", "true") // analyze all files | ||
} | ||
|
||
vcs { | ||
root( | ||
KotlinLangOrg, """ | ||
$SCRIPT_PATH | ||
""".trimIndent() | ||
) | ||
cleanCheckout = true | ||
showDependenciesChanges = true | ||
} | ||
|
||
steps { | ||
scriptDistAnalyze {} | ||
} | ||
|
||
dependencies { | ||
dependency(PageViews) { | ||
snapshot {} | ||
artifacts { | ||
artifactRules = """ | ||
page_views_map.json => data/ | ||
""".trimIndent() | ||
} | ||
} | ||
} | ||
|
||
init() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
.teamcity/builds/apiReferences/kotlinx/coroutines/KotlinxCoroutinesBuildApiReference.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 20 additions & 15 deletions
35
.teamcity/builds/apiReferences/kotlinx/coroutines/KotlinxCoroutinesBuildSearchIndex.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
package builds.apiReferences.kotlinx.coroutines | ||
|
||
import builds.apiReferences.dependsOnDokkaPagesJson | ||
import builds.apiReferences.templates.BuildApiReferenceSearchIndex | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
import BuildParams.KOTLINX_COROUTINES_ID | ||
import builds.TemplateSearchIndex | ||
|
||
object KotlinxCoroutinesBuildSearchIndex: BuildType({ | ||
name = "Build search index for kotlinx.coroutines" | ||
object KotlinxCoroutinesBuildSearchIndex : TemplateSearchIndex({ | ||
name = "$KOTLINX_COROUTINES_ID search" | ||
description = "Build search index for Kotlinx Coroutines" | ||
|
||
templates(BuildApiReferenceSearchIndex) | ||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "$KOTLINX_COROUTINES_ID") | ||
} | ||
|
||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "kotlinx.coroutines") | ||
param("env.API_REFERENCE_URL", "/api/kotlinx.coroutines") | ||
} | ||
|
||
dependencies { | ||
dependsOnDokkaPagesJson(KotlinxCoroutinesBuildApiReference) | ||
} | ||
}) | ||
dependencies { | ||
dependency(KotlinxCoroutinesBuildApiReference) { | ||
snapshot {} | ||
artifacts { | ||
artifactRules = """ | ||
pages.zip!** => dist/api/$KOTLINX_COROUTINES_ID/ | ||
""".trimIndent() | ||
cleanDestination = true | ||
} | ||
} | ||
} | ||
}) |
16 changes: 9 additions & 7 deletions
16
.teamcity/builds/apiReferences/kotlinx/coroutines/KotlinxCoroutinesPrepareDokkaTemplates.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
package builds.apiReferences.kotlinx.coroutines | ||
|
||
import BuildParams.KOTLINX_COROUTINES_ID | ||
import builds.apiReferences.templates.PrepareDokkaTemplate | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
|
||
object KotlinxCoroutinesPrepareDokkaTemplates: BuildType({ | ||
name = "Prepare dokka templates for kotlinx.coroutines" | ||
object KotlinxCoroutinesPrepareDokkaTemplates : BuildType({ | ||
name = "$KOTLINX_COROUTINES_ID templates" | ||
description = "Build dokka templates for Kotlinx Coroutines" | ||
|
||
templates(PrepareDokkaTemplate) | ||
templates(PrepareDokkaTemplate) | ||
|
||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "kotlinx.coroutines") | ||
} | ||
}) | ||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "$KOTLINX_COROUTINES_ID") | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 19 additions & 14 deletions
33
.teamcity/builds/apiReferences/kotlinx/datetime/KotlinxDatetimeBuildSearchIndex.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,25 @@ | ||
package builds.apiReferences.kotlinx.datetime | ||
|
||
import builds.apiReferences.dependsOnDokkaPagesJson | ||
import builds.apiReferences.templates.BuildApiReferenceSearchIndex | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
import BuildParams.KOTLINX_DATETIME_ID | ||
import builds.TemplateSearchIndex | ||
|
||
object KotlinxDatetimeBuildSearchIndex: BuildType({ | ||
name = "Build search index for kotlinx-datetime" | ||
object KotlinxDatetimeBuildSearchIndex : TemplateSearchIndex({ | ||
name = "$KOTLINX_DATETIME_ID search" | ||
description = "Build search index for Kotlinx Datetime" | ||
|
||
templates(BuildApiReferenceSearchIndex) | ||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "$KOTLINX_DATETIME_ID") | ||
} | ||
|
||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "kotlinx-datetime") | ||
param("env.API_REFERENCE_URL", "/api/kotlinx-datetime") | ||
} | ||
|
||
dependencies { | ||
dependsOnDokkaPagesJson(KotlinxDatetimeBuildApiReference) | ||
} | ||
dependencies { | ||
dependency(KotlinxDatetimeBuildApiReference) { | ||
snapshot {} | ||
artifacts { | ||
artifactRules = """ | ||
pages.zip!** => dist/api/$KOTLINX_DATETIME_ID/ | ||
""".trimIndent() | ||
cleanDestination = true | ||
} | ||
} | ||
} | ||
}) |
14 changes: 8 additions & 6 deletions
14
.teamcity/builds/apiReferences/kotlinx/datetime/KotlinxDatetimePrepareDokkaTemplates.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,16 @@ | ||
package builds.apiReferences.kotlinx.datetime | ||
|
||
import BuildParams.KOTLINX_DATETIME_ID | ||
import builds.apiReferences.templates.PrepareDokkaTemplate | ||
import jetbrains.buildServer.configs.kotlin.BuildType | ||
|
||
object KotlinxDatetimePrepareDokkaTemplates: BuildType({ | ||
name = "Prepare dokka templates for kotlinx-datetime" | ||
object KotlinxDatetimePrepareDokkaTemplates : BuildType({ | ||
name = "$KOTLINX_DATETIME_ID templates" | ||
description = "Build dokka templates for Kotlinx Datetime" | ||
|
||
templates(PrepareDokkaTemplate) | ||
templates(PrepareDokkaTemplate) | ||
|
||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "kotlinx-datetime") | ||
} | ||
params { | ||
param("env.ALGOLIA_INDEX_NAME", "$KOTLINX_DATETIME_ID") | ||
} | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.