Skip to content

Commit

Permalink
Add target to produce API proto
Browse files Browse the repository at this point in the history
This change should help users who want to use the API exporter, which was previously unused.

Closes bazelbuild#15220.

PiperOrigin-RevId: 441183743
  • Loading branch information
fweikert authored and copybara-github committed Apr 12, 2022
1 parent 4710ef8 commit 5c73d86
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/main/java/com/google/devtools/build/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -521,3 +521,21 @@ genrule(
"popd && mv $(@D)/gen_docs/tmp.zip $@",
visibility = ["//scripts/docs:__pkg__"],
)

genrule(
name = "gen_api_proto",
srcs = [
"//src/main/java/com/google/devtools/build/docgen:bazel_link_map",
],
outs = ["builtin.pb"],
cmd = (
"$(location //src/main/java/com/google/devtools/build/docgen:api_exporter)" +
" --output_file=$@" +
" --link_map_path=$(location //src/main/java/com/google/devtools/build/docgen:bazel_link_map) " +
" --provider=com.google.devtools.build.lib.bazel.rules.BazelRuleClassProvider" +
" --input_dir=$$PWD/src/main/java/com/google/devtools/build/lib"
),
tools = [
"//src/main/java/com/google/devtools/build/docgen:api_exporter",
],
)

0 comments on commit 5c73d86

Please sign in to comment.