This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
forked from stackb/rules_proto
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdeps.bzl
67 lines (57 loc) · 2.32 KB
/
deps.bzl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
load(
"//:deps.bzl",
"com_google_protobuf",
"io_grpc_grpc_java",
"MAVEN_SERVER_URLS",
)
load(
"//protobuf:deps.bzl",
"protobuf",
)
def com_google_guava_guava(**kwargs):
if "com_google_guava_guava" not in native.existing_rules():
jvm_maven_import_external(
name = "com_google_guava_guava",
artifact = "com.google.guava:guava:29.0",
server_urls = MAVEN_SERVER_URLS,
licenses = ["reciprocal"], # CDDL License
)
# From https://github.com/grpc/grpc-java/blob/master/repositories.bzl
def javax_annotation_javax_annotation_api(**kwargs):
# Use //stub:javax_annotation for neverlink=1 support.
if "javax_annotation_javax_annotation_api" not in native.existing_rules():
jvm_maven_import_external(
name = "javax_annotation_javax_annotation_api",
artifact = "javax.annotation:javax.annotation-api:1.3.2",
server_urls = MAVEN_SERVER_URLS,
licenses = ["reciprocal"], # CDDL License
)
# From https://github.com/grpc/grpc-java/blob/master/repositories.bzl
def com_google_errorprone_error_prone_annotations(**kwargs):
# Use //stub:javax_annotation for neverlink=1 support.
if "com_google_errorprone_error_prone_annotations" not in native.existing_rules():
jvm_maven_import_external(
name = "com_google_errorprone_error_prone_annotations",
artifact = "com.google.errorprone:error_prone_annotations:2.4.0",
server_urls = MAVEN_SERVER_URLS,
licenses = ["notice"], # Apache 2.0
)
if "error_prone_annotations" not in native.existing_rules():
native.bind(
name = "error_prone_annotations",
actual = "@com_google_errorprone_error_prone_annotations//jar",
)
def java_proto_compile(**kwargs):
protobuf(**kwargs)
def java_grpc_compile(**kwargs):
java_proto_compile(**kwargs)
io_grpc_grpc_java(**kwargs)
def java_proto_library(**kwargs):
java_proto_compile(**kwargs)
javax_annotation_javax_annotation_api(**kwargs)
com_google_guava_guava(**kwargs)
def java_grpc_library(**kwargs):
java_grpc_compile(**kwargs)
java_proto_library(**kwargs)
com_google_errorprone_error_prone_annotations(**kwargs)