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

Skip to content

Commit 4a4bd16

Browse files
committed
Java/Kotlin: prepare for internal bazel packaging
1 parent b71ffc6 commit 4a4bd16

3 files changed

Lines changed: 26 additions & 2 deletions

File tree

java/downgrades/BUILD.bazel

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
load("@rules_pkg//:mappings.bzl", "pkg_files", "strip_prefix")
2+
3+
pkg_files(
4+
name = "downgrades",
5+
srcs = glob(
6+
["**"],
7+
exclude = ["BUILD.bazel"],
8+
),
9+
prefix = "downgrades",
10+
strip_prefix = strip_prefix.from_pkg(),
11+
visibility = ["//visibility:public"],
12+
)

java/kotlin-extractor/BUILD.bazel

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,13 @@ _resources = [
178178
actual = _common_extractor_name_prefix,
179179
visibility = ["//visibility:public"],
180180
),
181+
filegroup(
182+
name = "many",
183+
srcs = ["%s-%s-%s" % (
184+
_common_extractor_name_prefix,
185+
variant,
186+
version,
187+
) for variant in ("standalone", "embeddable") for version in VERSIONS],
188+
visibility = ["//visibility:public"],
189+
),
181190
) if not _for_embeddable else None

misc/bazel/internal/git_lfs_smudge.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ def is_lfs_pointer(fileobj):
2323
lfs_pointer = input.read()
2424
rel_src = src.relative_to(source_dir).as_posix()
2525
with open(src.name, 'wb') as output:
26-
subprocess.run(["git", "-c", f"lfs.fetchinclude={rel_src}", "lfs", "smudge", "--", rel_src],
27-
input=lfs_pointer, stdout=output, check=True, cwd=source_dir)
26+
subprocess.run(
27+
["git",
28+
"-c", f"lfs.fetchinclude={rel_src}", "-c", "lfs.fetchexclude=",
29+
"lfs", "smudge", "--", rel_src],
30+
input=lfs_pointer, stdout=output, check=True, cwd=source_dir)
2831
continue
2932
pathlib.Path(src.name).symlink_to(src)

0 commit comments

Comments
 (0)