Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a970c2d

Browse files
committed
Kotlin: move empty zip from git to internal bazel repo rule
1 parent e963b84 commit a970c2d

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

java/kotlin-extractor/deps.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ kt_jvm_import(
1111
)
1212
"""
1313

14+
_empty_zip = "PK\005\006\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000\000"
15+
1416
def _get_dep(repository_ctx, name):
1517
return repository_ctx.path(Label("//java/kotlin-extractor/deps:%s" % name))
1618

@@ -19,15 +21,15 @@ def _kotlin_dep_impl(repository_ctx):
1921
lfs_smudge(repository_ctx, [_get_dep(repository_ctx, name + ".jar")])
2022

2123
# for some reason rules_kotlin warns about these jars missing, this is to silence those warnings
22-
empty = _get_dep(repository_ctx, "empty.zip")
24+
repository_ctx.file("empty.zip", _empty_zip)
2325
for jar in (
2426
"annotations-13.0.jar",
2527
"kotlin-stdlib.jar",
2628
"kotlin-reflect.jar",
2729
"kotlin-script-runtime.jar",
2830
"trove4j.jar",
2931
):
30-
repository_ctx.symlink(empty, jar)
32+
repository_ctx.symlink("empty.zip", jar)
3133
repository_ctx.file("BUILD.bazel", _kotlin_dep_build.format(name = name))
3234

3335
_kotlin_dep = repository_rule(
-22 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)