Skip to content

Commit

Permalink
Bazel: add filegroups for better query support
Browse files Browse the repository at this point in the history
Summary: This ensures `bazel query kythe/release/kythe.sh` works even without `kythe.sh` being used in a target.

Reviewers: zarko

Reviewed By: zarko

Differential Revision: https://phabricator-dot-kythe-repo.appspot.com/D209
  • Loading branch information
schroederc committed Apr 21, 2015
1 parent b981758 commit 51ad21a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 1 deletion.
3 changes: 3 additions & 0 deletions BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package(default_visibility = ["//visibility:private"])

exports_files(glob(["*"]))
2 changes: 1 addition & 1 deletion buildtools/linter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ lint_campfire() {

lint_copyright() {
case $file in
third_party/*|*.md|CAMPFIRE|*/BUILD|.campfire_settings|buildtools/*|*/testdata/*|*.yaml|*.json|*.html|*.pb.go|.arclint|.gitignore|*.bzl)
third_party/*|*.md|CAMPFIRE|BUILD|*/BUILD|.campfire_settings|buildtools/*|*/testdata/*|*.yaml|*.json|*.html|*.pb.go|.arclint|.gitignore|*.bzl)
;; # skip copyright checks
*)
if ! grep -Pq 'Copyright 201[45] Google Inc. All rights reserved.' "$file"; then
Expand Down
6 changes: 6 additions & 0 deletions kythe/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,9 @@ package_group(
"//kythe/...",
],
)

filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//visibility:private"],
)
6 changes: 6 additions & 0 deletions third_party/BUILD
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
package(default_visibility = ["//visibility:public"])

filegroup(
name = "srcs",
srcs = glob(["**"]),
visibility = ["//visibility:private"],
)

java_import(
name = "junit4",
jars = [
Expand Down

0 comments on commit 51ad21a

Please sign in to comment.