Skip to content

Commit 4c93083

Browse files
jketemaCopilot
andcommitted
Carry CodeQL Kotlin patches to 2.4.21
Keep the CodeQL-specific language/API version mapping and disable jdeps emission in the upgraded rules_kotlin archive. Use the upstream 2.4.21 module definition and registry version directly, without an extra version-rewrite patch. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2266123 commit 4c93083

7 files changed

Lines changed: 29 additions & 59 deletions

File tree

‎misc/bazel/registry/modules/rules_kotlin/2.2.2-codeql.1/patches/codeql_add_language_version_option.patch‎

Lines changed: 0 additions & 30 deletions
This file was deleted.

‎misc/bazel/registry/modules/rules_kotlin/2.2.2-codeql.1/source.json‎

Lines changed: 0 additions & 9 deletions
This file was deleted.

misc/bazel/registry/modules/rules_kotlin/2.2.2-codeql.1/MODULE.bazel renamed to misc/bazel/registry/modules/rules_kotlin/2.4.21/MODULE.bazel

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,19 @@
1+
"""Bazel module manifest for the released rules_kotlin package."""
2+
13
module(
24
name = "rules_kotlin",
3-
version = "2.2.2-codeql.1",
5+
version = "2.4.21",
46
compatibility_level = 1,
57
repo_name = "rules_kotlin",
68
)
79

810
bazel_dep(name = "platforms", version = "0.0.11")
9-
bazel_dep(name = "bazel_skylib", version = "1.7.1")
11+
bazel_dep(name = "bazel_skylib", version = "1.8.2")
1012
bazel_dep(name = "rules_java", version = "8.9.0")
11-
bazel_dep(name = "rules_android", version = "0.6.4")
12-
bazel_dep(name = "bazel_features", version = "1.25.0")
13-
bazel_dep(name = "protobuf", version = "29.0", repo_name = "com_google_protobuf")
14-
bazel_dep(name = "rules_proto", version = "6.0.2", repo_name = "rules_proto")
15-
bazel_dep(name = "abseil-py", version = "2.1.0", repo_name = "py_absl")
16-
bazel_dep(name = "rules_cc", version = "0.0.16")
17-
bazel_dep(name = "bazel_worker_api", version = "0.0.8")
18-
bazel_dep(name = "bazel_worker_java", version = "0.0.8")
13+
bazel_dep(name = "rules_license", version = "1.0.0")
14+
bazel_dep(name = "rules_android", version = "0.7.3")
15+
bazel_dep(name = "bazel_features", version = "1.39.0")
16+
bazel_dep(name = "bazel_lib", version = "3.1.0")
1917

2018
rules_java_toolchains = use_extension("@rules_java//java:extensions.bzl", "toolchains")
2119
use_repo(rules_java_toolchains, "remote_java_tools")
@@ -26,13 +24,16 @@ rules_kotlin_extensions = use_extension(
2624
)
2725
use_repo(
2826
rules_kotlin_extensions,
27+
"btapi_impl",
2928
"com_github_google_ksp",
3029
"com_github_jetbrains_kotlin",
3130
"com_github_pinterest_ktlint",
32-
"kotlin_build_tools_impl",
31+
"jarjar",
32+
"kotlin_build_tools_api",
33+
"kotlinx_coroutines_core_jvm",
3334
"kotlinx_serialization_core_jvm",
3435
"kotlinx_serialization_json",
3536
"kotlinx_serialization_json_jvm",
3637
)
3738

38-
register_toolchains("//kotlin/internal:default_toolchain")
39+
register_toolchains("//kotlin:default_toolchain")
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
--- a/src/main/starlark/core/options/opts.kotlinc.bzl
2+
+++ b/src/main/starlark/core/options/opts.kotlinc.bzl
3+
@@ -98 +98 @@
4+
- return ["-language-version=%s" % version]
5+
+ return ["-language-version=%s" % version, "-api-version=%s" % version]

misc/bazel/registry/modules/rules_kotlin/2.2.2-codeql.1/patches/codeql_do_not_emit_jdeps.patch renamed to misc/bazel/registry/modules/rules_kotlin/2.4.21/patches/codeql_do_not_emit_jdeps.patch

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ allows us to not have to specify that option (and therefore pull in `rules_kotli
44
internal repo.
55
--- a/kotlin/settings/BUILD.bazel
66
+++ b/kotlin/settings/BUILD.bazel
7-
@@ -16,6 +16,6 @@ release_archive(
8-
# Flag that controls the emission of jdeps files during kotlin jvm compilation.
9-
bool_flag(
10-
name = "jvm_emit_jdeps",
7+
@@ -19 +19 @@
118
- build_setting_default = True, # Upstream default behavior
129
+ build_setting_default = False,
13-
visibility = ["//visibility:public"],
14-
)
15-
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"integrity": "sha256-qjJVRS2+m1LaK6d4fwhl8QeAWIUQnznD1br8IaUhvLY=",
3+
"url": "https://github.com/bazel-contrib/rules_kotlin/releases/download/v2.4.21/rules_kotlin-v2.4.21.tar.gz",
4+
"patches": {
5+
"codeql_add_language_version_option.patch": "sha256-3ge9oiBmjhY7qPhYZpuN8E1e2Bv0ntsVpy98WOJv2To=",
6+
"codeql_do_not_emit_jdeps.patch": "sha256-nS1N5h/nA2+y5nIdkdRxHGfp+m/EKq4B5UQF6DXzcYs="
7+
},
8+
"patch_strip": 1
9+
}

‎misc/bazel/registry/modules/rules_kotlin/metadata.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"github:bazelbuild/rules_kotlin"
2222
],
2323
"versions": [
24-
"2.2.2-codeql.1"
24+
"2.4.21"
2525
],
2626
"yanked_versions": {}
2727
}

0 commit comments

Comments
 (0)