summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Pursehouse <dpursehouse@collab.net>2018-12-07 11:07:41 +0900
committerDavid Pursehouse <dpursehouse@collab.net>2018-12-07 11:07:41 +0900
commit1fa4bcfb6e1782a6ca240a404d7dcc1fa35cecea (patch)
treecfe469aa3729ae027c94bd6ff0f812fa8e280f73
parent0f13adc0bb04cea1578c5d86db5328324f2db05a (diff)
Bazel: Clean up package visibility settings
For packages having a default visiblity defined, it is redundant to also set the same visibility per package, so remove those. For packages that only have one rule, and its visibility differs from the default visibility, remove the default visibility. Also clean up wrapping of some of the default definitions. Change-Id: I9e81c3f724b4ffde7a652b485d33c650866ad122
-rw-r--r--BUILD2
-rw-r--r--Documentation/BUILD6
-rw-r--r--gerrit-httpd/BUILD5
-rw-r--r--gerrit-reviewdb/BUILD6
-rw-r--r--lib/commons/BUILD10
-rw-r--r--lib/elasticsearch-rest-client/BUILD1
-rw-r--r--lib/greenmail/BUILD1
-rw-r--r--lib/httpcomponents/BUILD3
-rw-r--r--lib/jackson/BUILD2
-rw-r--r--lib/lucene/BUILD5
-rw-r--r--lib/polymer_externs/BUILD4
-rw-r--r--polygerrit-ui/BUILD5
-rw-r--r--polygerrit-ui/app/BUILD4
13 files changed, 5 insertions, 49 deletions
diff --git a/BUILD b/BUILD
index 722e240851..576caf6ae3 100644
--- a/BUILD
+++ b/BUILD
@@ -9,7 +9,6 @@ genrule(
cmd = ("cat bazel-out/volatile-status.txt bazel-out/stable-status.txt | " +
"grep STABLE_BUILD_GERRIT_LABEL | cut -d ' ' -f 2 > $@"),
stamp = 1,
- visibility = ["//visibility:public"],
)
genrule(
@@ -17,7 +16,6 @@ genrule(
srcs = ["//Documentation:licenses.txt"],
outs = ["LICENSES.txt"],
cmd = "cp $< $@",
- visibility = ["//visibility:public"],
)
pkg_war(name = "gerrit")
diff --git a/Documentation/BUILD b/Documentation/BUILD
index 624802ca3a..25762b3ec9 100644
--- a/Documentation/BUILD
+++ b/Documentation/BUILD
@@ -40,7 +40,6 @@ filegroup(
":prettify_files",
"//:LICENSES.txt",
],
- visibility = ["//visibility:public"],
)
license_map(
@@ -51,7 +50,6 @@ license_map(
"//gerrit-gwtui:ui_module",
"//polygerrit-ui/app:polygerrit_ui",
],
- visibility = ["//visibility:public"],
)
license_map(
@@ -60,7 +58,6 @@ license_map(
"//gerrit-gwtui:ui_module",
"//polygerrit-ui/app:polygerrit_ui",
],
- visibility = ["//visibility:public"],
)
DOC_DIR = "Documentation"
@@ -88,7 +85,6 @@ genasciidoc(
srcs = SRCS,
attributes = documentation_attributes(),
backend = "html5",
- visibility = ["//visibility:public"],
)
genasciidoc_zip(
@@ -97,7 +93,6 @@ genasciidoc_zip(
attributes = documentation_attributes(),
backend = "html5",
directory = DOC_DIR,
- visibility = ["//visibility:public"],
)
genasciidoc_zip(
@@ -107,5 +102,4 @@ genasciidoc_zip(
backend = "html5",
directory = DOC_DIR,
searchbox = False,
- visibility = ["//visibility:public"],
)
diff --git a/gerrit-httpd/BUILD b/gerrit-httpd/BUILD
index fda84af075..716a6c5e2c 100644
--- a/gerrit-httpd/BUILD
+++ b/gerrit-httpd/BUILD
@@ -1,6 +1,4 @@
-package(
- default_visibility = ["//visibility:public"],
-)
+package(default_visibility = ["//visibility:public"])
load("//tools/bzl:junit.bzl", "junit_tests")
@@ -14,7 +12,6 @@ java_library(
name = "httpd",
srcs = SRCS,
resources = RESOURCES,
- visibility = ["//visibility:public"],
deps = [
"//gerrit-antlr:query_exception",
"//gerrit-common:annotations",
diff --git a/gerrit-reviewdb/BUILD b/gerrit-reviewdb/BUILD
index 35c1535dad..138e849f78 100644
--- a/gerrit-reviewdb/BUILD
+++ b/gerrit-reviewdb/BUILD
@@ -1,6 +1,4 @@
-package(
- default_visibility = ["//visibility:public"],
-)
+package(default_visibility = ["//visibility:public"])
load("//tools/bzl:gwt.bzl", "gwt_module")
load("//tools/bzl:junit.bzl", "junit_tests")
@@ -13,7 +11,6 @@ gwt_module(
name = "client",
srcs = glob([SRC + "client/**/*.java"]),
gwt_xml = SRC + "ReviewDB.gwt.xml",
- visibility = ["//visibility:public"],
deps = [
"//gerrit-extension-api:client",
"//lib:gwtorm-client",
@@ -25,7 +22,6 @@ java_library(
name = "server",
srcs = glob([SRC + "**/*.java"]),
resources = glob(["src/main/resources/**/*"]),
- visibility = ["//visibility:public"],
deps = [
"//gerrit-extension-api:api",
"//lib:guava",
diff --git a/lib/commons/BUILD b/lib/commons/BUILD
index ddb11e3d97..4208ec5a02 100644
--- a/lib/commons/BUILD
+++ b/lib/commons/BUILD
@@ -3,49 +3,42 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "codec",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-codec//jar"],
)
java_library(
name = "collections",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-collections//jar"],
)
java_library(
name = "compress",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-compress//jar"],
)
java_library(
name = "io",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-io//jar"],
)
java_library(
name = "lang",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-lang//jar"],
)
java_library(
name = "net",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-net//jar"],
)
java_library(
name = "dbcp",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-dbcp//jar"],
runtime_deps = [":pool"],
)
@@ -53,20 +46,17 @@ java_library(
java_library(
name = "pool",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-pool//jar"],
)
java_library(
name = "oro",
data = ["//lib:LICENSE-Apache1.1"],
- visibility = ["//visibility:public"],
exports = ["@commons-oro//jar"],
)
java_library(
name = "validator",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@commons-validator//jar"],
)
diff --git a/lib/elasticsearch-rest-client/BUILD b/lib/elasticsearch-rest-client/BUILD
index c6357d083e..8df3c704ef 100644
--- a/lib/elasticsearch-rest-client/BUILD
+++ b/lib/elasticsearch-rest-client/BUILD
@@ -3,6 +3,5 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "elasticsearch-rest-client",
data = ["//lib:LICENSE-elasticsearch"],
- visibility = ["//visibility:public"],
exports = ["@elasticsearch-rest-client//jar"],
)
diff --git a/lib/greenmail/BUILD b/lib/greenmail/BUILD
index 55eb9f38a4..41fbdab1e5 100644
--- a/lib/greenmail/BUILD
+++ b/lib/greenmail/BUILD
@@ -3,6 +3,5 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "greenmail",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@greenmail//jar"],
)
diff --git a/lib/httpcomponents/BUILD b/lib/httpcomponents/BUILD
index fd34214e6a..336b3a07f8 100644
--- a/lib/httpcomponents/BUILD
+++ b/lib/httpcomponents/BUILD
@@ -3,7 +3,6 @@ package(default_visibility = ["//visibility:public"])
java_library(
name = "fluent-hc",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@fluent-hc//jar"],
runtime_deps = [":httpclient"],
)
@@ -11,7 +10,6 @@ java_library(
java_library(
name = "httpclient",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@httpclient//jar"],
runtime_deps = [
":httpcore",
@@ -23,7 +21,6 @@ java_library(
java_library(
name = "httpcore",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@httpcore//jar"],
)
diff --git a/lib/jackson/BUILD b/lib/jackson/BUILD
index 3bc0a2be8f..55b14af8fc 100644
--- a/lib/jackson/BUILD
+++ b/lib/jackson/BUILD
@@ -1,5 +1,3 @@
-package(default_visibility = ["//visibility:public"])
-
java_library(
name = "jackson-core",
data = ["//lib:LICENSE-Apache2.0"],
diff --git a/lib/lucene/BUILD b/lib/lucene/BUILD
index 421caed03d..eab2ac8266 100644
--- a/lib/lucene/BUILD
+++ b/lib/lucene/BUILD
@@ -11,13 +11,11 @@ merge_maven_jars(
"@lucene-core//jar",
],
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
)
java_library(
name = "lucene-analyzers-common",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@lucene-analyzers-common//jar"],
runtime_deps = [":lucene-core-and-backward-codecs"],
)
@@ -25,14 +23,12 @@ java_library(
java_library(
name = "lucene-core",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@lucene-core//jar"],
)
java_library(
name = "lucene-misc",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@lucene-misc//jar"],
runtime_deps = [":lucene-core-and-backward-codecs"],
)
@@ -40,7 +36,6 @@ java_library(
java_library(
name = "lucene-queryparser",
data = ["//lib:LICENSE-Apache2.0"],
- visibility = ["//visibility:public"],
exports = ["@lucene-queryparser//jar"],
runtime_deps = [":lucene-core-and-backward-codecs"],
)
diff --git a/lib/polymer_externs/BUILD b/lib/polymer_externs/BUILD
index 2f1bdbded2..cd71d64392 100644
--- a/lib/polymer_externs/BUILD
+++ b/lib/polymer_externs/BUILD
@@ -12,9 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-package(
- default_visibility = ["//visibility:public"],
-)
+package(default_visibility = ["//visibility:public"])
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_library")
diff --git a/polygerrit-ui/BUILD b/polygerrit-ui/BUILD
index 1f11cdeedd..68ed588787 100644
--- a/polygerrit-ui/BUILD
+++ b/polygerrit-ui/BUILD
@@ -1,6 +1,4 @@
-package(
- default_visibility = ["//visibility:public"],
-)
+package(default_visibility = ["//visibility:public"])
load("//tools/bzl:js.bzl", "bower_component_bundle")
load("//tools/bzl:genrule2.bzl", "genrule2")
@@ -39,5 +37,4 @@ genrule2(
"zip -qr $$ROOT/$@ fonts",
]),
output_to_bindir = 1,
- visibility = ["//visibility:public"],
)
diff --git a/polygerrit-ui/app/BUILD b/polygerrit-ui/app/BUILD
index 6a668e0f5f..1a83e962f8 100644
--- a/polygerrit-ui/app/BUILD
+++ b/polygerrit-ui/app/BUILD
@@ -1,6 +1,4 @@
-package(
- default_visibility = ["//visibility:public"],
-)
+package(default_visibility = ["//visibility:public"])
load("//tools/bzl:genrule2.bzl", "genrule2")
load("@io_bazel_rules_closure//closure:defs.bzl", "closure_js_binary", "closure_js_library")