Skip to content

Commit 7e5a90c

Browse files
hvadehrarules_java Copybara
authored andcommitted
Fix bzl_library graph for java_single_jar
Also add a `starlark_doc_extract` target as a regression test PiperOrigin-RevId: 868067494 Change-Id: I1d373d9f40a49bb3affea1eb1ec4ce263b610662
1 parent f70e126 commit 7e5a90c

3 files changed

Lines changed: 22 additions & 2 deletions

File tree

java/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bzl_library(
6666
srcs = ["java_single_jar.bzl"],
6767
visibility = ["//visibility:public"],
6868
deps = [
69-
"//java/bazel/rules", # copybara-use-repo-external-label
69+
"//java/bazel/rules:java_single_jar_bzl", # copybara-use-repo-external-label
7070
],
7171
)
7272

java/bazel/rules/BUILD.bazel

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ filegroup(
2323

2424
bzl_library(
2525
name = "rules",
26-
srcs = glob(["*.bzl"]),
26+
srcs = glob(
27+
["*.bzl"],
28+
exclude = ["bazel_java_single_jar.bzl"],
29+
),
2730
visibility = ["//visibility:public"], # for Bazel docgen
2831
deps = [
2932
"//java/common:semantics_bzl",
@@ -36,6 +39,17 @@ bzl_library(
3639
],
3740
)
3841

42+
bzl_library(
43+
name = "java_single_jar_bzl",
44+
srcs = ["bazel_java_single_jar.bzl"],
45+
visibility = [
46+
"//java:__pkg__",
47+
],
48+
deps = [
49+
"//java/common/rules:java_single_jar_bzl",
50+
],
51+
)
52+
3953
filegroup(
4054
name = "for_bazel_tests",
4155
testonly = 1,

test/BUILD.bazel

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,9 @@ starlark_doc_extract(
8181
src = "@compatibility_proxy//:proxy.bzl",
8282
deps = ["@compatibility_proxy//:proxy_bzl"],
8383
)
84+
85+
starlark_doc_extract(
86+
name = "java_single_jar_bzl_graph",
87+
src = "//java:java_single_jar.bzl",
88+
deps = ["//java:java_single_jar"],
89+
)

0 commit comments

Comments
 (0)