1
1
"""Definitions for bzlmod module extensions."""
2
2
3
3
load ("@bazel_skylib//lib:modules.bzl" , "modules" )
4
- load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
5
4
load (
6
5
"//src/main/starlark/core/repositories:initialize.release.bzl" ,
7
6
_kotlin_repositories = "kotlin_repositories" ,
8
7
_kotlinc_version = "kotlinc_version" ,
9
8
_ksp_version = "ksp_version" ,
10
9
)
11
- load ("//src/main/starlark/core/repositories:versions.bzl" , _versions = "versions" )
12
10
load (":bzlmod_impl.bzl" , "configure_modules_and_repositories" , "tag_classes" )
13
11
14
12
def _rules_kotlin_extensions_impl (mctx ):
@@ -18,20 +16,6 @@ def _rules_kotlin_extensions_impl(mctx):
18
16
_kotlinc_version ,
19
17
_ksp_version ,
20
18
)
21
-
22
- _versions .use_repository (
23
- name = "released_rules_kotlin" ,
24
- rule = http_archive ,
25
- version = _versions .RULES_KOTLIN ,
26
- patch_cmds = [
27
- # without repo mapping, force remap the internal dependencies to use the correct version of kotlin
28
- "grep -rl '\" @*{repo}' src kotlin | xargs -I F perl -i -pe 's/\" (@*)({repo})/\" \\ 1released_\\ 2/g' F" .format (
29
- repo = repo ,
30
- )
31
- for repo in ["com_github_jetbrains_kotlin" , "com_github_google_ksp" ]
32
- ],
33
- )
34
-
35
19
return modules .use_all_repos (mctx , reproducible = True )
36
20
37
21
rules_kotlin_extensions = module_extension (
0 commit comments