1*e07d83d3SAndroid Build Coastguard Worker"""External dependencies for grpc-java.""" 2*e07d83d3SAndroid Build Coastguard Worker 3*e07d83d3SAndroid Build Coastguard Workerload("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 4*e07d83d3SAndroid Build Coastguard Worker 5*e07d83d3SAndroid Build Coastguard Worker# For use with maven_install's artifacts. 6*e07d83d3SAndroid Build Coastguard Worker# maven_install( 7*e07d83d3SAndroid Build Coastguard Worker# ... 8*e07d83d3SAndroid Build Coastguard Worker# artifacts = [ 9*e07d83d3SAndroid Build Coastguard Worker# # Your own deps 10*e07d83d3SAndroid Build Coastguard Worker# ] + IO_GRPC_GRPC_JAVA_ARTIFACTS, 11*e07d83d3SAndroid Build Coastguard Worker# ) 12*e07d83d3SAndroid Build Coastguard WorkerIO_GRPC_GRPC_JAVA_ARTIFACTS = [ 13*e07d83d3SAndroid Build Coastguard Worker "com.google.android:annotations:4.1.1.4", 14*e07d83d3SAndroid Build Coastguard Worker "com.google.api.grpc:proto-google-common-protos:2.17.0", 15*e07d83d3SAndroid Build Coastguard Worker "com.google.auth:google-auth-library-credentials:1.4.0", 16*e07d83d3SAndroid Build Coastguard Worker "com.google.auth:google-auth-library-oauth2-http:1.4.0", 17*e07d83d3SAndroid Build Coastguard Worker "com.google.auto.value:auto-value-annotations:1.10.1", 18*e07d83d3SAndroid Build Coastguard Worker "com.google.auto.value:auto-value:1.10.1", 19*e07d83d3SAndroid Build Coastguard Worker "com.google.code.findbugs:jsr305:3.0.2", 20*e07d83d3SAndroid Build Coastguard Worker "com.google.code.gson:gson:2.10.1", 21*e07d83d3SAndroid Build Coastguard Worker "com.google.errorprone:error_prone_annotations:2.18.0", 22*e07d83d3SAndroid Build Coastguard Worker "com.google.guava:failureaccess:1.0.1", 23*e07d83d3SAndroid Build Coastguard Worker "com.google.guava:guava:31.1-android", 24*e07d83d3SAndroid Build Coastguard Worker "com.google.re2j:re2j:1.7", 25*e07d83d3SAndroid Build Coastguard Worker "com.google.truth:truth:1.0.1", 26*e07d83d3SAndroid Build Coastguard Worker "com.squareup.okhttp:okhttp:2.7.5", 27*e07d83d3SAndroid Build Coastguard Worker "com.squareup.okio:okio:1.17.5", 28*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-buffer:4.1.87.Final", 29*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-codec-http2:4.1.87.Final", 30*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-codec-http:4.1.87.Final", 31*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-codec-socks:4.1.87.Final", 32*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-codec:4.1.87.Final", 33*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-common:4.1.87.Final", 34*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-handler-proxy:4.1.87.Final", 35*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-handler:4.1.87.Final", 36*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-resolver:4.1.87.Final", 37*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-tcnative-boringssl-static:2.0.61.Final", 38*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-tcnative-classes:2.0.61.Final", 39*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-transport-native-epoll:jar:linux-x86_64:4.1.87.Final", 40*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-transport-native-unix-common:4.1.87.Final", 41*e07d83d3SAndroid Build Coastguard Worker "io.netty:netty-transport:4.1.87.Final", 42*e07d83d3SAndroid Build Coastguard Worker "io.opencensus:opencensus-api:0.31.0", 43*e07d83d3SAndroid Build Coastguard Worker "io.opencensus:opencensus-contrib-grpc-metrics:0.31.0", 44*e07d83d3SAndroid Build Coastguard Worker "io.perfmark:perfmark-api:0.26.0", 45*e07d83d3SAndroid Build Coastguard Worker "junit:junit:4.13.2", 46*e07d83d3SAndroid Build Coastguard Worker "org.apache.tomcat:annotations-api:6.0.53", 47*e07d83d3SAndroid Build Coastguard Worker "org.codehaus.mojo:animal-sniffer-annotations:1.23", 48*e07d83d3SAndroid Build Coastguard Worker] 49*e07d83d3SAndroid Build Coastguard Worker 50*e07d83d3SAndroid Build Coastguard Worker# For use with maven_install's override_targets. 51*e07d83d3SAndroid Build Coastguard Worker# maven_install( 52*e07d83d3SAndroid Build Coastguard Worker# ... 53*e07d83d3SAndroid Build Coastguard Worker# override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS, 54*e07d83d3SAndroid Build Coastguard Worker# ) 55*e07d83d3SAndroid Build Coastguard Worker# 56*e07d83d3SAndroid Build Coastguard Worker# If you have your own overrides as well, you can use: 57*e07d83d3SAndroid Build Coastguard Worker# override_targets = { 58*e07d83d3SAndroid Build Coastguard Worker# "your.target:artifact": "@//third_party/artifact", 59*e07d83d3SAndroid Build Coastguard Worker# } | IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS, 60*e07d83d3SAndroid Build Coastguard WorkerIO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS = { 61*e07d83d3SAndroid Build Coastguard Worker "com.google.protobuf:protobuf-java": "@com_google_protobuf//:protobuf_java", 62*e07d83d3SAndroid Build Coastguard Worker "com.google.protobuf:protobuf-java-util": "@com_google_protobuf//:protobuf_java_util", 63*e07d83d3SAndroid Build Coastguard Worker "com.google.protobuf:protobuf-javalite": "@com_google_protobuf_javalite//:protobuf_java_lite", 64*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-alts": "@io_grpc_grpc_java//alts", 65*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-api": "@io_grpc_grpc_java//api", 66*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-auth": "@io_grpc_grpc_java//auth", 67*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-census": "@io_grpc_grpc_java//census", 68*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-context": "@io_grpc_grpc_java//context", 69*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-core": "@io_grpc_grpc_java//core:core_maven", 70*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-googleapis": "@io_grpc_grpc_java//googleapis", 71*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-grpclb": "@io_grpc_grpc_java//grpclb", 72*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-netty": "@io_grpc_grpc_java//netty", 73*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-netty-shaded": "@io_grpc_grpc_java//netty:shaded_maven", 74*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-okhttp": "@io_grpc_grpc_java//okhttp", 75*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-protobuf": "@io_grpc_grpc_java//protobuf", 76*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-protobuf-lite": "@io_grpc_grpc_java//protobuf-lite", 77*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-rls": "@io_grpc_grpc_java//rls", 78*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-services": "@io_grpc_grpc_java//services:services_maven", 79*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-stub": "@io_grpc_grpc_java//stub", 80*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-testing": "@io_grpc_grpc_java//testing", 81*e07d83d3SAndroid Build Coastguard Worker "io.grpc:grpc-xds": "@io_grpc_grpc_java//xds:xds_maven", 82*e07d83d3SAndroid Build Coastguard Worker} 83*e07d83d3SAndroid Build Coastguard Worker 84*e07d83d3SAndroid Build Coastguard Workerdef grpc_java_repositories(): 85*e07d83d3SAndroid Build Coastguard Worker """Imports dependencies for grpc-java.""" 86*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("com_github_cncf_xds"): 87*e07d83d3SAndroid Build Coastguard Worker http_archive( 88*e07d83d3SAndroid Build Coastguard Worker name = "com_github_cncf_xds", 89*e07d83d3SAndroid Build Coastguard Worker strip_prefix = "xds-e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7", 90*e07d83d3SAndroid Build Coastguard Worker sha256 = "0d33b83f8c6368954e72e7785539f0d272a8aba2f6e2e336ed15fd1514bc9899", 91*e07d83d3SAndroid Build Coastguard Worker urls = [ 92*e07d83d3SAndroid Build Coastguard Worker "https://github.com/cncf/xds/archive/e9ce68804cb4e64cab5a52e3c8baf840d4ff87b7.tar.gz", 93*e07d83d3SAndroid Build Coastguard Worker ], 94*e07d83d3SAndroid Build Coastguard Worker ) 95*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("com_github_grpc_grpc"): 96*e07d83d3SAndroid Build Coastguard Worker http_archive( 97*e07d83d3SAndroid Build Coastguard Worker name = "com_github_grpc_grpc", 98*e07d83d3SAndroid Build Coastguard Worker strip_prefix = "grpc-1.46.0", 99*e07d83d3SAndroid Build Coastguard Worker sha256 = "67423a4cd706ce16a88d1549297023f0f9f0d695a96dd684adc21e67b021f9bc", 100*e07d83d3SAndroid Build Coastguard Worker urls = [ 101*e07d83d3SAndroid Build Coastguard Worker "https://github.com/grpc/grpc/archive/v1.46.0.tar.gz", 102*e07d83d3SAndroid Build Coastguard Worker ], 103*e07d83d3SAndroid Build Coastguard Worker ) 104*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("com_google_protobuf"): 105*e07d83d3SAndroid Build Coastguard Worker com_google_protobuf() 106*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("com_google_protobuf_javalite"): 107*e07d83d3SAndroid Build Coastguard Worker com_google_protobuf_javalite() 108*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("com_google_googleapis"): 109*e07d83d3SAndroid Build Coastguard Worker http_archive( 110*e07d83d3SAndroid Build Coastguard Worker name = "com_google_googleapis", 111*e07d83d3SAndroid Build Coastguard Worker sha256 = "49930468563dd48283e8301e8d4e71436bf6d27ac27c235224cc1a098710835d", 112*e07d83d3SAndroid Build Coastguard Worker strip_prefix = "googleapis-ca1372c6d7bcb199638ebfdb40d2b2660bab7b88", 113*e07d83d3SAndroid Build Coastguard Worker urls = [ 114*e07d83d3SAndroid Build Coastguard Worker "https://github.com/googleapis/googleapis/archive/ca1372c6d7bcb199638ebfdb40d2b2660bab7b88.tar.gz", 115*e07d83d3SAndroid Build Coastguard Worker ], 116*e07d83d3SAndroid Build Coastguard Worker ) 117*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("io_bazel_rules_go"): 118*e07d83d3SAndroid Build Coastguard Worker http_archive( 119*e07d83d3SAndroid Build Coastguard Worker name = "io_bazel_rules_go", 120*e07d83d3SAndroid Build Coastguard Worker sha256 = "ab21448cef298740765f33a7f5acee0607203e4ea321219f2a4c85a6e0fb0a27", 121*e07d83d3SAndroid Build Coastguard Worker urls = [ 122*e07d83d3SAndroid Build Coastguard Worker "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.32.0/rules_go-v0.32.0.zip", 123*e07d83d3SAndroid Build Coastguard Worker "https://github.com/bazelbuild/rules_go/releases/download/v0.32.0/rules_go-v0.32.0.zip", 124*e07d83d3SAndroid Build Coastguard Worker ], 125*e07d83d3SAndroid Build Coastguard Worker ) 126*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("io_grpc_grpc_proto"): 127*e07d83d3SAndroid Build Coastguard Worker io_grpc_grpc_proto() 128*e07d83d3SAndroid Build Coastguard Worker if not native.existing_rule("envoy_api"): 129*e07d83d3SAndroid Build Coastguard Worker http_archive( 130*e07d83d3SAndroid Build Coastguard Worker name = "envoy_api", 131*e07d83d3SAndroid Build Coastguard Worker sha256 = "b426904abf51ba21dd8947a05694bb3c861d6f5e436e4673e74d7d7bfb6d3188", 132*e07d83d3SAndroid Build Coastguard Worker strip_prefix = "data-plane-api-268824e4eee3d7770a347a5dc5aaddc0b1b14e24", 133*e07d83d3SAndroid Build Coastguard Worker urls = [ 134*e07d83d3SAndroid Build Coastguard Worker "https://github.com/envoyproxy/data-plane-api/archive/268824e4eee3d7770a347a5dc5aaddc0b1b14e24.tar.gz", 135*e07d83d3SAndroid Build Coastguard Worker ], 136*e07d83d3SAndroid Build Coastguard Worker ) 137*e07d83d3SAndroid Build Coastguard Worker 138*e07d83d3SAndroid Build Coastguard Workerdef com_google_protobuf(): 139*e07d83d3SAndroid Build Coastguard Worker # proto_library rules implicitly depend on @com_google_protobuf//:protoc, 140*e07d83d3SAndroid Build Coastguard Worker # which is the proto-compiler. 141*e07d83d3SAndroid Build Coastguard Worker # This statement defines the @com_google_protobuf repo. 142*e07d83d3SAndroid Build Coastguard Worker http_archive( 143*e07d83d3SAndroid Build Coastguard Worker name = "com_google_protobuf", 144*e07d83d3SAndroid Build Coastguard Worker sha256 = "5d0f05587aa3ad56079b4c4481dcb462267e5f1075d905c321f8ed6339e74ab0", 145*e07d83d3SAndroid Build Coastguard Worker strip_prefix = "protobuf-22.3", 146*e07d83d3SAndroid Build Coastguard Worker urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protobuf-22.3.zip"], 147*e07d83d3SAndroid Build Coastguard Worker ) 148*e07d83d3SAndroid Build Coastguard Worker 149*e07d83d3SAndroid Build Coastguard Workerdef com_google_protobuf_javalite(): 150*e07d83d3SAndroid Build Coastguard Worker # java_lite_proto_library rules implicitly depend on @com_google_protobuf_javalite 151*e07d83d3SAndroid Build Coastguard Worker http_archive( 152*e07d83d3SAndroid Build Coastguard Worker name = "com_google_protobuf_javalite", 153*e07d83d3SAndroid Build Coastguard Worker sha256 = "5d0f05587aa3ad56079b4c4481dcb462267e5f1075d905c321f8ed6339e74ab0", 154*e07d83d3SAndroid Build Coastguard Worker strip_prefix = "protobuf-22.3", 155*e07d83d3SAndroid Build Coastguard Worker urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v22.3/protobuf-22.3.zip"], 156*e07d83d3SAndroid Build Coastguard Worker ) 157*e07d83d3SAndroid Build Coastguard Worker 158*e07d83d3SAndroid Build Coastguard Workerdef io_grpc_grpc_proto(): 159*e07d83d3SAndroid Build Coastguard Worker http_archive( 160*e07d83d3SAndroid Build Coastguard Worker name = "io_grpc_grpc_proto", 161*e07d83d3SAndroid Build Coastguard Worker sha256 = "464e97a24d7d784d9c94c25fa537ba24127af5aae3edd381007b5b98705a0518", 162*e07d83d3SAndroid Build Coastguard Worker strip_prefix = "grpc-proto-08911e9d585cbda3a55eb1dcc4b99c89aebccff8", 163*e07d83d3SAndroid Build Coastguard Worker urls = ["https://github.com/grpc/grpc-proto/archive/08911e9d585cbda3a55eb1dcc4b99c89aebccff8.zip"], 164*e07d83d3SAndroid Build Coastguard Worker ) 165