3
3
load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
4
4
load ("@bazel_tools//tools/build_defs/repo:jvm.bzl" , "jvm_maven_import_external" )
5
5
6
+ # For use with maven_install's artifacts.
7
+ # maven_install(
8
+ # ...
9
+ # artifacts = [
10
+ # # Your own deps
11
+ # ] + IO_GRPC_GRPC_JAVA_ARTIFACTS,
12
+ # )
13
+ IO_GRPC_GRPC_JAVA_ARTIFACTS = [
14
+ "com.google.android:annotations:4.1.1.4" ,
15
+ "com.google.api.grpc:proto-google-common-protos:1.17.0" ,
16
+ "com.google.auth:google-auth-library-credentials:0.19.0" ,
17
+ "com.google.auth:google-auth-library-oauth2-http:0.19.0" ,
18
+ "com.google.code.findbugs:jsr305:3.0.2" ,
19
+ "com.google.code.gson:gson:jar:2.8.6" ,
20
+ "com.google.errorprone:error_prone_annotations:2.3.3" ,
21
+ "com.google.guava:failureaccess:1.0.1" ,
22
+ "com.google.guava:guava:28.1-android" ,
23
+ "com.google.j2objc:j2objc-annotations:1.3" ,
24
+ "com.google.truth:truth:1.0" ,
25
+ "com.squareup.okhttp:okhttp:2.5.0" ,
26
+ "com.squareup.okio:okio:1.13.0" ,
27
+ "io.netty:netty-buffer:4.1.42.Final" ,
28
+ "io.netty:netty-codec-http2:4.1.42.Final" ,
29
+ "io.netty:netty-codec-http:4.1.42.Final" ,
30
+ "io.netty:netty-codec-socks:4.1.42.Final" ,
31
+ "io.netty:netty-codec:4.1.42.Final" ,
32
+ "io.netty:netty-common:4.1.42.Final" ,
33
+ "io.netty:netty-handler-proxy:4.1.42.Final" ,
34
+ "io.netty:netty-handler:4.1.42.Final" ,
35
+ "io.netty:netty-resolver:4.1.42.Final" ,
36
+ "io.netty:netty-tcnative-boringssl-static:2.0.26.Final" ,
37
+ "io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.42.Final" ,
38
+ "io.netty:netty-transport:4.1.42.Final" ,
39
+ "io.opencensus:opencensus-api:0.24.0" ,
40
+ "io.opencensus:opencensus-contrib-grpc-metrics:0.24.0" ,
41
+ "io.perfmark:perfmark-api:0.19.0" ,
42
+ "javax.annotation:javax.annotation-api:1.2" ,
43
+ "junit:junit:4.12" ,
44
+ "org.apache.commons:commons-lang3:3.5" ,
45
+ "org.codehaus.mojo:animal-sniffer-annotations:1.18" ,
46
+ ]
47
+
6
48
# For use with maven_install's override_targets.
7
49
# maven_install(
8
50
# ...
@@ -22,6 +64,9 @@ load("@bazel_tools//tools/build_defs/repo:jvm.bzl", "jvm_maven_import_external")
22
64
# "your.target:artifact": "@//third_party/artifact",
23
65
# )
24
66
IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS = {
67
+ "com.google.protobuf:protobuf-java" : "@com_google_protobuf//:protobuf_java" ,
68
+ "com.google.protobuf:protobuf-java-util" : "@com_google_protobuf//:protobuf_java_util" ,
69
+ "com.google.protobuf:protobuf-javalite" : "@com_google_protobuf_javalite//:protobuf_java_lite" ,
25
70
"io.grpc:grpc-alts" : "@io_grpc_grpc_java//alts" ,
26
71
"io.grpc:grpc-api" : "@io_grpc_grpc_java//api" ,
27
72
"io.grpc:grpc-auth" : "@io_grpc_grpc_java//auth" ,
@@ -39,6 +84,13 @@ IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS = {
39
84
40
85
def grpc_java_repositories ():
41
86
"""Imports dependencies for grpc-java."""
87
+ if not native .existing_rule ("com_google_protobuf" ):
88
+ com_google_protobuf ()
89
+ if not native .existing_rule ("com_google_protobuf_javalite" ):
90
+ com_google_protobuf_javalite ()
91
+ if not native .existing_rule ("io_grpc_grpc_proto" ):
92
+ io_grpc_grpc_proto ()
93
+
42
94
if not native .existing_rule ("com_google_android_annotations" ):
43
95
com_google_android_annotations ()
44
96
if not native .existing_rule ("com_google_api_grpc_proto_google_common_protos" ):
@@ -59,14 +111,8 @@ def grpc_java_repositories():
59
111
com_google_guava_failureaccess ()
60
112
if not native .existing_rule ("com_google_j2objc_j2objc_annotations" ):
61
113
com_google_j2objc_j2objc_annotations ()
62
- if not native .existing_rule ("com_google_protobuf" ):
63
- com_google_protobuf ()
64
- if not native .existing_rule ("com_google_protobuf_javalite" ):
65
- com_google_protobuf_javalite ()
66
114
if not native .existing_rule ("com_google_truth_truth" ):
67
115
com_google_truth_truth ()
68
- if not native .existing_rule ("io_grpc_grpc_proto" ):
69
- io_grpc_grpc_proto ()
70
116
if not native .existing_rule ("com_squareup_okhttp_okhttp" ):
71
117
com_squareup_okhttp_okhttp ()
72
118
if not native .existing_rule ("com_squareup_okio_okio" ):
@@ -93,8 +139,8 @@ def grpc_java_repositories():
93
139
io_netty_netty_tcnative_boringssl_static ()
94
140
if not native .existing_rule ("io_netty_netty_transport" ):
95
141
io_netty_netty_transport ()
96
- if not native .existing_rule ("io_netty_netty_transport_native_epoll " ):
97
- io_netty_netty_transport_native_epoll ()
142
+ if not native .existing_rule ("io_netty_netty_transport_native_epoll_linux_x86_64 " ):
143
+ io_netty_netty_transport_native_epoll_linux_x86_64 ()
98
144
if not native .existing_rule ("io_opencensus_opencensus_api" ):
99
145
io_opencensus_opencensus_api ()
100
146
if not native .existing_rule ("io_opencensus_opencensus_contrib_grpc_metrics" ):
@@ -368,9 +414,9 @@ def io_netty_netty_transport():
368
414
licenses = ["notice" ], # Apache 2.0
369
415
)
370
416
371
- def io_netty_netty_transport_native_epoll ():
417
+ def io_netty_netty_transport_native_epoll_linux_x86_64 ():
372
418
jvm_maven_import_external (
373
- name = "io_netty_netty_transport_native_epoll " ,
419
+ name = "io_netty_netty_transport_native_epoll_linux_x86_64 " ,
374
420
artifact = "io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.42.Final" ,
375
421
server_urls = ["https://repo.maven.apache.org/maven2/" ],
376
422
artifact_sha256 = "7bdf3003d5b60b061b494e62d1bafc420caf800efb743b14ec01ceaef1d3fa3e" ,
0 commit comments