Skip to content

Commit 9b518fb

Browse files
authored
Update Kotlin to 2.3.10 (#1453)
1 parent aeec5aa commit 9b518fb

File tree

5 files changed

+28
-9
lines changed

5 files changed

+28
-9
lines changed

docs/kotlin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -601,8 +601,8 @@ Call this in the WORKSPACE file to setup the Kotlin rules.
601601
| <a id="kotlin_repositories-is_bzlmod"></a>is_bzlmod | <p align="center"> - </p> | `False` |
602602
| <a id="kotlin_repositories-compiler_repository_name"></a>compiler_repository_name | for the kotlinc compiler repository. | `"com_github_jetbrains_kotlin"` |
603603
| <a id="kotlin_repositories-ksp_repository_name"></a>ksp_repository_name | <p align="center"> - </p> | `"com_github_google_ksp"` |
604-
| <a id="kotlin_repositories-compiler_release"></a>compiler_release | version provider from versions.bzl. | `struct(sha256 = "ea16ab1cab29d419bf41b60ecc0e305d449fa661d9c05fbcc5b2a6672505456a", url_templates = ["https://github.com/JetBrains/kotlin/releases/download/v{version}/kotlin-compiler-{version}.zip"], version = "2.3.0")` |
605-
| <a id="kotlin_repositories-ksp_compiler_release"></a>ksp_compiler_release | (internal) version provider from versions.bzl. | `struct(sha256 = "24cb0d869ab2ae9fcf630a747b6b7e662e4be26e8b83b9272f6f3c24813e0c5a", url_templates = ["https://github.com/google/ksp/releases/download/{version}/artifacts.zip"], version = "2.3.3")` |
604+
| <a id="kotlin_repositories-compiler_release"></a>compiler_release | version provider from versions.bzl. | `struct(sha256 = "c8d546f9ff433b529fb0ad43feceb39831040cae2ca8d17e7df46364368c9a9e", url_templates = ["https://github.com/JetBrains/kotlin/releases/download/v{version}/kotlin-compiler-{version}.zip"], version = "2.3.10")` |
605+
| <a id="kotlin_repositories-ksp_compiler_release"></a>ksp_compiler_release | (internal) version provider from versions.bzl. | `struct(sha256 = "91e7f24924fdf6328d3b85fe854e863a18b97de6a4ad09dd5326a591b7a1b010", url_templates = ["https://github.com/google/ksp/releases/download/{version}/artifacts.zip"], version = "2.3.5")` |
606606

607607

608608
<a id="versions.use_repository"></a>

kotlin/compiler/ksp.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,9 @@ def kt_configure_ksp():
4343
name = "symbol-processing-api",
4444
jar = _KSP_COMPILER_PLUGIN_REPO_PREFIX + "symbol-processing-api.jar",
4545
)
46+
47+
# KSP 2.3.5+ analysis API implementation expects the IntelliJ coroutines variant.
48+
kt_jvm_import(
49+
name = "ksp-intellij-kotlinx-coroutines-core-jvm",
50+
jar = _KSP_COMPILER_PLUGIN_REPO_PREFIX + "kotlinx-coroutines-core-jvm-intellij.jar",
51+
)

kotlin/internal/jvm/jvm.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ _implicit_deps = {
141141
),
142142
"_ksp2_kotlinx_coroutines": attr.label(
143143
doc = "kotlinx-coroutines-core-jvm JAR required by KSP2",
144-
default = Label("//kotlin/compiler:kotlinx-coroutines-core-jvm"),
144+
default = Label("//kotlin/compiler:ksp-intellij-kotlinx-coroutines-core-jvm"),
145145
cfg = "exec",
146146
),
147147
"_ksp2_symbol_processing_aa": attr.label(

src/main/starlark/core/repositories/ksp.bzl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ _JARS_INSIDE_REPO = [
44
"symbol-processing-api",
55
]
66

7+
_KOTLINX_COROUTINES_INTELLIJ = struct(
8+
version = "1.8.0-intellij-14",
9+
sha256 = "ef043856ef8f38703916960fac169c359d98d5febd571d67fccdfe75ba378de3",
10+
url_template = "https://repo1.maven.org/maven2/org/jetbrains/intellij/deps/kotlinx/kotlinx-coroutines-core-jvm/{version}/kotlinx-coroutines-core-jvm-{version}.jar",
11+
)
12+
713
def _ksp_compiler_plugin_repository_impl(repository_ctx):
814
"""Creates the KSP repository."""
915
attr = repository_ctx.attr
@@ -20,6 +26,13 @@ def _ksp_compiler_plugin_repository_impl(repository_ctx):
2026
},
2127
)
2228

29+
# KSP 2.3.5+ has a runtime dependency on the IntelliJ coroutines variant.
30+
repository_ctx.download(
31+
url = _KOTLINX_COROUTINES_INTELLIJ.url_template.format(version = _KOTLINX_COROUTINES_INTELLIJ.version),
32+
sha256 = _KOTLINX_COROUTINES_INTELLIJ.sha256,
33+
output = "kotlinx-coroutines-core-jvm-intellij.jar",
34+
)
35+
2336
# Remove unused .pom and checksum files files.
2437
repository_ctx.delete("com")
2538

src/main/starlark/core/repositories/versions.bzl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,25 +82,25 @@ versions = struct(
8282
sha256 = "5ba1ac917a06b0f02daaa60d10abbedd2220d60216af670c67a45b91c74cf8bb",
8383
),
8484
KOTLIN_CURRENT_COMPILER_RELEASE = version(
85-
version = "2.3.0",
85+
version = "2.3.10",
8686
url_templates = [
8787
"https://github.com/JetBrains/kotlin/releases/download/v{version}/kotlin-compiler-{version}.zip",
8888
],
89-
sha256 = "ea16ab1cab29d419bf41b60ecc0e305d449fa661d9c05fbcc5b2a6672505456a",
89+
sha256 = "c8d546f9ff433b529fb0ad43feceb39831040cae2ca8d17e7df46364368c9a9e",
9090
),
9191
KSP_CURRENT_COMPILER_PLUGIN_RELEASE = version(
92-
version = "2.3.3",
92+
version = "2.3.5",
9393
url_templates = [
9494
"https://github.com/google/ksp/releases/download/{version}/artifacts.zip",
9595
],
96-
sha256 = "24cb0d869ab2ae9fcf630a747b6b7e662e4be26e8b83b9272f6f3c24813e0c5a",
96+
sha256 = "91e7f24924fdf6328d3b85fe854e863a18b97de6a4ad09dd5326a591b7a1b010",
9797
),
9898
KOTLIN_BUILD_TOOLS_IMPL = version(
99-
version = "2.3.0",
99+
version = "2.3.10",
100100
url_templates = [
101101
"https://repo1.maven.org/maven2/org/jetbrains/kotlin/kotlin-build-tools-impl/{version}/kotlin-build-tools-impl-{version}.jar",
102102
],
103-
sha256 = "93a5e8ffb1000801c832a862b23bd9766f444e6f6c185c32b1fb57877fb5cea3",
103+
sha256 = "32f02a6af72b8e0c82f26343b68e0d1da1c844827478feb2fa9dc40df5f9bb5a",
104104
),
105105
RULES_ANDROID = version(
106106
version = "0.7.0",

0 commit comments

Comments
 (0)