Skip to content

Commit

Permalink
Rename proto_java_library to java_proto_library.
Browse files Browse the repository at this point in the history
RELNOTES[INC]: Renamed proto_java_library to java_proto_library.  The former
is now deprecated and will print out a warning when used.

--
MOS_MIGRATED_REVID=115012027
  • Loading branch information
jmmv authored and damienmg committed Feb 19, 2016
1 parent cefb639 commit 699f87a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
6 changes: 3 additions & 3 deletions examples/proto/BUILD
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
package(default_visibility = ["//visibility:public"])

load("//tools/build_rules:genproto.bzl", "proto_java_library")
load("//tools/build_rules:genproto.bzl", "java_proto_library")

proto_library(
name = "proto_smoke_test",
srcs = ["test.proto"],
)

# proto_java_library is a quick and dirty rule to help Bazel compile itself.
proto_java_library(
# java_proto_library is a quick and dirty rule to help Bazel compile itself.
java_proto_library(
name = "test_proto",
src = "test.proto",
)
Expand Down
6 changes: 3 additions & 3 deletions src/main/protobuf/BUILD
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package(default_visibility = ["//visibility:public"])

load("//tools/build_rules:genproto.bzl", "proto_java_library")
load("//tools/build_rules:genproto.bzl", "java_proto_library")

FILES = [
"build",
Expand All @@ -20,12 +20,12 @@ FILES = [
"remote_protocol",
]

[proto_java_library(
[java_proto_library(
name = s + "_proto",
src = s + ".proto",
) for s in FILES]

proto_java_library(
java_proto_library(
name = "build_proto_v2",
src = "build.proto",
)
Expand Down
7 changes: 6 additions & 1 deletion tools/build_rules/genproto.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ gensrcjar = rule(
)

# TODO(bazel-team): support proto => proto dependencies too
def proto_java_library(name, src):
def java_proto_library(name, src):
gensrcjar(name=name + "_srcjar", src=src)
native.java_library(
name=name,
Expand All @@ -74,3 +74,8 @@ def proto_java_library(name, src):
# The generated code has lots of 'rawtypes' warnings.
javacopts=["-Xlint:-rawtypes"],
)

def proto_java_library(name, src):
print("Deprecated: use java_proto_library() instead, proto_java_library " +
"will be removed in version 0.2.1")
java_proto_library(name, src)

0 comments on commit 699f87a

Please sign in to comment.