Skip to content

Commit cdb5b16

Browse files
authored
Use launcher stub template from bazel (#1082)
This was added in bazelbuild/bazel#12994 (and fixed in bazelbuild/bazel#13790). This has been included in all Bazel releases since 5.0.0, which is the minimum supported Bazel version of rules_kotlin according to https://github.com/bazelbuild/rules_kotlin/blob/master/README.md This prevents having a build-time dependency on access to raw.githubusercontent.com.
1 parent 66c9b48 commit cdb5b16

File tree

4 files changed

+2
-13
lines changed

4 files changed

+2
-13
lines changed

MODULE.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ use_repo(
1818
"com_github_google_ksp",
1919
"com_github_jetbrains_kotlin",
2020
"com_github_pinterest_ktlint",
21-
"kt_java_stub_template",
2221
"rules_android",
2322
)
2423

kotlin/internal/jvm/jvm.bzl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ _implicit_deps = {
134134
),
135135
"_java_stub_template": attr.label(
136136
cfg = "exec",
137-
default = Label("@kt_java_stub_template//file"),
137+
default = Label("@bazel_tools//tools/java:java_stub_template.txt"),
138+
allow_single_file = True,
138139
),
139140
"_toolchain": attr.label(
140141
doc = """The Kotlin JVM Runtime. it's only purpose is to enable the Android native rules to discover the Kotlin

src/main/starlark/core/repositories/initialize.release.bzl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,6 @@ def kotlin_repositories(
6363
strip_version = ksp_compiler_release.version,
6464
)
6565

66-
http_file(
67-
name = "kt_java_stub_template",
68-
urls = [("https://raw.githubusercontent.com/bazelbuild/bazel/" +
69-
versions.BAZEL_JAVA_LAUNCHER_VERSION +
70-
"/src/main/java/com/google/devtools/build/lib/bazel/rules/java/" +
71-
"java_stub_template.txt")],
72-
sha256 = versions.BAZEL_JAVA_LAUNCHER_SHA,
73-
)
74-
7566
maybe(
7667
http_file,
7768
name = "com_github_pinterest_ktlint",

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,6 @@ versions = struct(
5353
"https://github.com/bazelbuild/stardoc/releases/download/{version}/stardoc-{version}.tar.gz",
5454
],
5555
),
56-
BAZEL_JAVA_LAUNCHER_VERSION = "6.2.1",
57-
BAZEL_JAVA_LAUNCHER_SHA = "78e29525872594ffc783c825f428b3e61d4f3e632f46eaa64f004b2814c4a612",
5856
PINTEREST_KTLINT = version(
5957
version = "0.49.1",
6058
url_templates = [

0 commit comments

Comments
 (0)