Skip to content

Commit 5c73d86

Browse files
fweikertcopybara-github
authored andcommitted
Add target to produce API proto
This change should help users who want to use the API exporter, which was previously unused. Closes bazelbuild#15220. PiperOrigin-RevId: 441183743
1 parent 4710ef8 commit 5c73d86

File tree

1 file changed

+18
-0
lines changed
  • src/main/java/com/google/devtools/build/lib

1 file changed

+18
-0
lines changed

src/main/java/com/google/devtools/build/lib/BUILD

+18
Original file line numberDiff line numberDiff line change
@@ -521,3 +521,21 @@ genrule(
521521
"popd && mv $(@D)/gen_docs/tmp.zip $@",
522522
visibility = ["//scripts/docs:__pkg__"],
523523
)
524+
525+
genrule(
526+
name = "gen_api_proto",
527+
srcs = [
528+
"//src/main/java/com/google/devtools/build/docgen:bazel_link_map",
529+
],
530+
outs = ["builtin.pb"],
531+
cmd = (
532+
"$(location //src/main/java/com/google/devtools/build/docgen:api_exporter)" +
533+
" --output_file=$@" +
534+
" --link_map_path=$(location //src/main/java/com/google/devtools/build/docgen:bazel_link_map) " +
535+
" --provider=com.google.devtools.build.lib.bazel.rules.BazelRuleClassProvider" +
536+
" --input_dir=$$PWD/src/main/java/com/google/devtools/build/lib"
537+
),
538+
tools = [
539+
"//src/main/java/com/google/devtools/build/docgen:api_exporter",
540+
],
541+
)

0 commit comments

Comments
 (0)