Skip to content

Commit

Permalink
fixing up Bazel deprecations and renaming bazel_common to google_baze…
Browse files Browse the repository at this point in the history
…l_common to be more consistent.
  • Loading branch information
perezd committed Aug 5, 2019
1 parent b34805e commit 19d8654
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ workspace(name = "protopoet")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "bazel_common",
name = "google_bazel_common",
sha256 = "ccdd09559b49c7efd9e4b0b617b18e2a4bbdb2142fc30dfd3501eb5fa1294dcc",
strip_prefix = "bazel-common-f3dc1a775d21f74fc6f4bbcf076b8af2f6261a69",
urls = ["https://github.com/google/bazel-common/archive/f3dc1a775d21f74fc6f4bbcf076b8af2f6261a69.zip"],
)

load("@bazel_common//:workspace_defs.bzl", "google_common_workspace_rules")
load("@google_bazel_common//:workspace_defs.bzl", "google_common_workspace_rules")

google_common_workspace_rules()
8 changes: 4 additions & 4 deletions java/protopoet/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ java_library(
deps = [
":proto_writer",
":usage_monitor",
"@bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/guava",
],
)

java_library(
name = "line_wrapper",
srcs = ["LineWrapper.java"],
deps = [
"@bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/guava",
],
)

Expand All @@ -49,7 +49,7 @@ java_library(
"UsedNameMonitor.java",
],
deps = [
"@bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/guava",
],
)

Expand All @@ -61,7 +61,7 @@ java_library(
],
deps = [
":line_wrapper",
"@bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/guava",
],
)

Expand Down
4 changes: 2 additions & 2 deletions javatests/junit.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ def _SafeIndex(l, val):
return -1

def _AsClassName(fname):
path_name = [x.path for x in fname.files][0]
path_name = [x.path for x in fname.files.to_list()][0]
file_name = path_name.split("/")[-1]
return ".".join([_PKG, file_name.split(".")[0]]) + ".class"

def _impl(ctx):
classes = ",".join(
[_AsClassName(x) for x in ctx.attr.srcs])
ctx.file_action(output=ctx.outputs.out, content=_OUTPUT % (
ctx.actions.write(output=ctx.outputs.out, content=_OUTPUT % (
classes, ctx.attr.outname))

_GenSuite = rule(
Expand Down
24 changes: 12 additions & 12 deletions javatests/protopoet/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ junit_tests(
srcs = ["ProtoWriterTest.java"],
deps = [
"//java/protopoet:proto_writer",
"@bazel_common//third_party/java/guava",
"@bazel_common//third_party/java/junit",
"@bazel_common//third_party/java/truth",
"@google_bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/junit",
"@google_bazel_common//third_party/java/truth",
],
)

Expand All @@ -20,9 +20,9 @@ junit_tests(
],
deps = [
"//java/protopoet:usage_monitor",
"@bazel_common//third_party/java/guava",
"@bazel_common//third_party/java/junit",
"@bazel_common//third_party/java/truth",
"@google_bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/junit",
"@google_bazel_common//third_party/java/truth",
],
)

Expand All @@ -48,9 +48,9 @@ junit_tests(
":expected_output",
"//java/protopoet",
"//java/protopoet:proto_writer",
"@bazel_common//third_party/java/guava",
"@bazel_common//third_party/java/junit",
"@bazel_common//third_party/java/truth",
"@google_bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/junit",
"@google_bazel_common//third_party/java/truth",
],
)

Expand All @@ -59,8 +59,8 @@ java_library(
srcs = ["ExpectedOutput.java"],
deps = [
"//java/protopoet:proto_writer",
"@bazel_common//third_party/java/guava",
"@bazel_common//third_party/java/junit",
"@bazel_common//third_party/java/truth",
"@google_bazel_common//third_party/java/guava",
"@google_bazel_common//third_party/java/junit",
"@google_bazel_common//third_party/java/truth",
],
)

0 comments on commit 19d8654

Please sign in to comment.