bazel: Use the `artifact` macro for loading maven deps

The recommended way to load dependencies from `rules_jvm_external`
is to make use of the `@maven` workspace, and the most readable
way of doing that is to use the `artifact` macro provides.

This removes the need to generate the "compat" namespaces, which
`rules_jvm_external` provided for backwards compatibility with
older releases. This change also sets things up for supporting
`bzlmod`: this requires all workspaces accessed by a library to
be named "up front" in the `MODULE.bazel` file. This way, the
only repo that needs to be exported is `@maven`, rather than the
current huge list.
This commit is contained in:
David Burns 2024-03-28 21:33:32 +00:00 committed by GitHub
parent 4ef1baddd2
commit 00649913b0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 169 additions and 139 deletions

View File

@ -12,6 +12,7 @@
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
load("@rules_jvm_external//:defs.bzl", "artifact")
load(":java_grpc_library.bzl", "java_grpc_library") load(":java_grpc_library.bzl", "java_grpc_library")
java_proto_library( java_proto_library(
@ -33,9 +34,9 @@ java_library(
"//protobuf", "//protobuf",
"//stub", "//stub",
"//stub:javax_annotation", "//stub:javax_annotation",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
], ],
) )
@ -47,8 +48,8 @@ java_library(
"//protobuf-lite", "//protobuf-lite",
"//stub", "//stub",
"//stub:javax_annotation", "//stub:javax_annotation",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
], ],
) )
@ -56,7 +57,7 @@ java_plugin(
name = "auto_value", name = "auto_value",
generates_api = 1, generates_api = 1,
processor_class = "com.google.auto.value.processor.AutoValueProcessor", processor_class = "com.google.auto.value.processor.AutoValueProcessor",
deps = ["@com_google_auto_value_auto_value//jar"], deps = [artifact("com.google.auto.value:auto-value")],
) )
java_library( java_library(
@ -65,7 +66,7 @@ java_library(
neverlink = 1, neverlink = 1,
visibility = ["//:__subpackages__"], visibility = ["//:__subpackages__"],
exports = [ exports = [
"@com_google_auto_value_auto_value_annotations//jar", artifact("com.google.auto.value:auto-value-annotations"),
"@org_apache_tomcat_annotations_api//jar", # @Generated for Java 9+ artifact("org.apache.tomcat:annotations-api"), # @Generated for Java 9+
], ],
) )

View File

@ -34,14 +34,9 @@ switched_rules_by_language(
maven_install( maven_install(
artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS + PROTOBUF_MAVEN_ARTIFACTS, artifacts = IO_GRPC_GRPC_JAVA_ARTIFACTS + PROTOBUF_MAVEN_ARTIFACTS,
generate_compat_repositories = True,
override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS, override_targets = IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS,
repositories = [ repositories = [
"https://repo.maven.apache.org/maven2/", "https://repo.maven.apache.org/maven2/",
], ],
strict_visibility = True, strict_visibility = True,
) )
load("@maven//:compat.bzl", "compat_repositories")
compat_repositories()

View File

@ -1,3 +1,4 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("@rules_proto//proto:defs.bzl", "proto_library") load("@rules_proto//proto:defs.bzl", "proto_library")
load("//:java_grpc_library.bzl", "java_grpc_library") load("//:java_grpc_library.bzl", "java_grpc_library")
@ -14,16 +15,16 @@ java_library(
"//grpclb", "//grpclb",
"//netty", "//netty",
"//stub", "//stub",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@com_google_j2objc_j2objc_annotations//jar",
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
"@io_netty_netty_buffer//jar", artifact("com.google.code.findbugs:jsr305"),
"@io_netty_netty_codec//jar", artifact("com.google.guava:guava"),
"@io_netty_netty_common//jar", artifact("com.google.j2objc:j2objc-annotations"),
"@io_netty_netty_handler//jar", artifact("io.netty:netty-buffer"),
"@io_netty_netty_transport//jar", artifact("io.netty:netty-codec"),
artifact("io.netty:netty-common"),
artifact("io.netty:netty-handler"),
artifact("io.netty:netty-transport"),
], ],
) )
@ -41,13 +42,13 @@ java_library(
"//auth", "//auth",
"//core:internal", "//core:internal",
"//netty", "//netty",
"@com_google_auth_google_auth_library_oauth2_http//jar", artifact("com.google.auth:google-auth-library-oauth2-http"),
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
"@io_netty_netty_common//jar", artifact("io.netty:netty-common"),
"@io_netty_netty_handler//jar", artifact("io.netty:netty-handler"),
"@io_netty_netty_transport//jar", artifact("io.netty:netty-transport"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "api", name = "api",
srcs = glob([ srcs = glob([
@ -7,10 +9,10 @@ java_library(
javacopts = ["-Xep:DoNotCall:OFF"], # Remove once requiring Bazel 3.4.0+; allows non-final javacopts = ["-Xep:DoNotCall:OFF"], # Remove once requiring Bazel 3.4.0+; allows non-final
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_errorprone_error_prone_annotations//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@com_google_guava_failureaccess//jar", # future transitive dep of Guava. See #5214 artifact("com.google.guava:failureaccess"), # future transitive dep of Guava. See #5214
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "auth", name = "auth",
srcs = glob([ srcs = glob([
@ -6,9 +8,9 @@ java_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//api", "//api",
"@com_google_auth_google_auth_library_credentials//jar", artifact("com.google.auth:google-auth-library-credentials"),
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "census", name = "census",
srcs = glob([ srcs = glob([
@ -7,9 +9,9 @@ java_library(
deps = [ deps = [
"//api", "//api",
"//context", "//context",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@io_opencensus_opencensus_api//jar", artifact("io.opencensus:opencensus-api"),
"@io_opencensus_opencensus_contrib_grpc_metrics//jar", artifact("io.opencensus:opencensus-contrib-grpc-metrics"),
], ],
) )

View File

@ -1,4 +1,5 @@
load("@rules_cc//cc:defs.bzl", "cc_binary") load("@rules_cc//cc:defs.bzl", "cc_binary")
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//:java_grpc_library.bzl", "java_rpc_toolchain") load("//:java_grpc_library.bzl", "java_rpc_toolchain")
# This should not generally be referenced. Users should use java_grpc_library # This should not generally be referenced. Users should use java_grpc_library
@ -22,8 +23,8 @@ java_library(
"//protobuf", "//protobuf",
"//stub", "//stub",
"//stub:javax_annotation", "//stub:javax_annotation",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
], ],
) )
@ -35,8 +36,8 @@ java_library(
"//protobuf-lite", "//protobuf-lite",
"//stub", "//stub",
"//stub:javax_annotation", "//stub:javax_annotation",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "core", name = "core",
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
@ -23,14 +25,14 @@ java_library(
deps = [ deps = [
"//api", "//api",
"//context", "//context",
"@com_google_android_annotations//jar", artifact("com.google.code.gson:gson"),
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.android:annotations"),
"@com_google_code_gson_gson//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_errorprone_error_prone_annotations//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
"@io_perfmark_perfmark_api//jar", artifact("io.perfmark:perfmark-api"),
"@org_codehaus_mojo_animal_sniffer_annotations//jar", artifact("org.codehaus.mojo:animal-sniffer-annotations"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "googleapis", name = "googleapis",
srcs = glob([ srcs = glob([
@ -9,6 +11,6 @@ java_library(
"//api", "//api",
"//core:internal", "//core:internal",
"//xds", "//xds",
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
], ],
) )

View File

@ -1,3 +1,4 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//:java_grpc_library.bzl", "java_grpc_library") load("//:java_grpc_library.bzl", "java_grpc_library")
java_library( java_library(
@ -16,11 +17,11 @@ java_library(
"//core:internal", "//core:internal",
"//util", "//util",
"//stub", "//stub",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@com_google_j2objc_j2objc_annotations//jar",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
"@io_grpc_grpc_proto//:grpclb_load_balancer_java_proto", "@io_grpc_grpc_proto//:grpclb_load_balancer_java_proto",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
artifact("com.google.j2objc:j2objc-annotations"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "inprocess", name = "inprocess",
srcs = glob([ srcs = glob([
@ -5,12 +7,12 @@ java_library(
]), ]),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//core:internal",
"//api", "//api",
"//context", "//context",
"@com_google_code_findbugs_jsr305//jar", "//core:internal",
"@com_google_errorprone_error_prone_annotations//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.guava:guava"),
artifact("com.google.j2objc:j2objc-annotations"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "netty", name = "netty",
srcs = glob([ srcs = glob([
@ -10,22 +12,22 @@ java_library(
deps = [ deps = [
"//api", "//api",
"//core:internal", "//core:internal",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_errorprone_error_prone_annotations//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
"@io_netty_netty_buffer//jar", artifact("io.netty:netty-buffer"),
"@io_netty_netty_codec//jar", artifact("io.netty:netty-codec"),
"@io_netty_netty_codec_http//jar", artifact("io.netty:netty-codec-http"),
"@io_netty_netty_codec_http2//jar", artifact("io.netty:netty-codec-http2"),
"@io_netty_netty_codec_socks//jar", artifact("io.netty:netty-codec-socks"),
"@io_netty_netty_common//jar", artifact("io.netty:netty-common"),
"@io_netty_netty_handler//jar", artifact("io.netty:netty-handler"),
"@io_netty_netty_handler_proxy//jar", artifact("io.netty:netty-handler-proxy"),
"@io_netty_netty_resolver//jar", artifact("io.netty:netty-resolver"),
"@io_netty_netty_transport//jar", artifact("io.netty:netty-transport"),
"@io_netty_netty_transport_native_unix_common//jar", artifact("io.netty:netty-transport-native-unix-common"),
"@io_perfmark_perfmark_api//jar", artifact("io.perfmark:perfmark-api"),
], ],
) )

View File

@ -1,12 +1,14 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
# Publicly exposed in //netty package. Purposefully does not export any symbols. # Publicly exposed in //netty package. Purposefully does not export any symbols.
java_library( java_library(
name = "shaded", name = "shaded",
visibility = ["//netty:__pkg__"], visibility = ["//netty:__pkg__"],
runtime_deps = [ runtime_deps = [
"//netty", "//netty",
"@io_netty_netty_tcnative_boringssl_static//jar", artifact("io.netty:netty-tcnative-boringssl-static"),
"@io_netty_netty_tcnative_classes//jar", artifact("io.netty:netty-tcnative-classes"),
"@io_netty_netty_transport_native_unix_common//jar", artifact("io.netty:netty-transport-native-unix-common"),
"@io_netty_netty_transport_native_epoll_linux_x86_64//jar", artifact("io.netty:netty-transport-native-epoll_linux_x86_64"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "okhttp", name = "okhttp",
srcs = glob([ srcs = glob([
@ -12,12 +14,12 @@ java_library(
"//api", "//api",
"//core:internal", "//core:internal",
"//util", "//util",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_errorprone_error_prone_annotations//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
"@com_squareup_okhttp_okhttp//jar", artifact("com.squareup.okhttp:okhttp"),
"@com_squareup_okio_okio//jar", artifact("com.squareup.okio:okio"),
"@io_perfmark_perfmark_api//jar", artifact("io.perfmark:perfmark-api"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "protobuf-lite", name = "protobuf-lite",
srcs = glob([ srcs = glob([
@ -6,9 +8,9 @@ java_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//api", "//api",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
] + select({ ] + select({
":android": ["@com_google_protobuf_javalite//:protobuf_javalite"], ":android": ["@com_google_protobuf_javalite//:protobuf_javalite"],
"//conditions:default": ["@com_google_protobuf//:protobuf_java"], "//conditions:default": ["@com_google_protobuf//:protobuf_java"],

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "protobuf", name = "protobuf",
srcs = glob([ srcs = glob([
@ -7,10 +9,10 @@ java_library(
deps = [ deps = [
"//api", "//api",
"//protobuf-lite", "//protobuf-lite",
"@com_google_api_grpc_proto_google_common_protos//jar",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@com_google_j2objc_j2objc_annotations//jar",
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
artifact("com.google.api.grpc:proto-google-common-protos"),
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
artifact("com.google.j2objc:j2objc-annotations"),
], ],
) )

View File

@ -1,3 +1,4 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//:java_grpc_library.bzl", "java_grpc_library") load("//:java_grpc_library.bzl", "java_grpc_library")
java_library( java_library(
@ -12,13 +13,13 @@ java_library(
"//api", "//api",
"//core", "//core",
"//core:internal", "//core:internal",
"//util",
"//stub", "//stub",
"@com_google_auto_value_auto_value_annotations//jar", "//util",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@io_grpc_grpc_proto//:rls_config_java_proto", "@io_grpc_grpc_proto//:rls_config_java_proto",
"@io_grpc_grpc_proto//:rls_java_proto", "@io_grpc_grpc_proto//:rls_java_proto",
artifact("com.google.auto.value:auto-value-annotations"),
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
], ],
) )

View File

@ -1,3 +1,4 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//:java_grpc_library.bzl", "java_grpc_library") load("//:java_grpc_library.bzl", "java_grpc_library")
package(default_visibility = ["//visibility:public"]) package(default_visibility = ["//visibility:public"])
@ -26,7 +27,7 @@ java_library(
deps = [ deps = [
":channelz", ":channelz",
"//api", "//api",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
], ],
) )
@ -35,15 +36,15 @@ java_library(
srcs = [ srcs = [
"src/main/java/io/grpc/services/CallMetricRecorder.java", "src/main/java/io/grpc/services/CallMetricRecorder.java",
"src/main/java/io/grpc/services/MetricRecorder.java", "src/main/java/io/grpc/services/MetricRecorder.java",
"src/main/java/io/grpc/services/MetricReport.java",
"src/main/java/io/grpc/services/MetricRecorderHelper.java", "src/main/java/io/grpc/services/MetricRecorderHelper.java",
"src/main/java/io/grpc/services/MetricReport.java",
], ],
deps = [ deps = [
"//api", "//api",
"//context", "//context",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_errorprone_error_prone_annotations//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
], ],
) )
@ -72,11 +73,11 @@ java_library(
":_channelz_java_grpc", ":_channelz_java_grpc",
"//api", "//api",
"//stub", "//stub",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
"@io_grpc_grpc_proto//:channelz_java_proto", "@io_grpc_grpc_proto//:channelz_java_proto",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
], ],
) )
@ -90,11 +91,11 @@ java_library(
"//api", "//api",
"//protobuf", "//protobuf",
"//stub", "//stub",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
"@io_grpc_grpc_proto//:reflection_java_proto_deprecated", "@io_grpc_grpc_proto//:reflection_java_proto_deprecated",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
], ],
) )
@ -110,9 +111,9 @@ java_library(
"//api", "//api",
"//context", "//context",
"//stub", "//stub",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@io_grpc_grpc_proto//:health_java_proto", "@io_grpc_grpc_proto//:health_java_proto",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
], ],
) )
@ -131,9 +132,9 @@ java_library(
"//api", "//api",
"//core:internal", "//core:internal",
"//util", "//util",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@io_grpc_grpc_proto//:health_java_proto", "@io_grpc_grpc_proto//:health_java_proto",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "stub", name = "stub",
srcs = glob([ srcs = glob([
@ -7,10 +9,10 @@ java_library(
deps = [ deps = [
"//api", "//api",
"//context", "//context",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_errorprone_error_prone_annotations//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
], ],
) )
@ -20,5 +22,5 @@ java_library(
name = "javax_annotation", name = "javax_annotation",
neverlink = 1, # @Generated is source-retention neverlink = 1, # @Generated is source-retention
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
exports = ["@org_apache_tomcat_annotations_api//jar"], exports = [artifact("org.apache.tomcat:annotations-api")],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "testing", name = "testing",
testonly = 1, testonly = 1,
@ -12,12 +14,12 @@ java_library(
"//api", "//api",
"//context", "//context",
"//inprocess", "//inprocess",
"//util",
"//stub", "//stub",
"@com_google_code_findbugs_jsr305//jar", "//util",
"@com_google_guava_guava//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.guava:guava"),
"@com_google_truth_truth//jar", artifact("com.google.j2objc:j2objc-annotations"),
"@junit_junit//jar", artifact("com.google.truth:truth"),
artifact("junit:junit"),
], ],
) )

View File

@ -1,3 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
java_library( java_library(
name = "util", name = "util",
srcs = glob([ srcs = glob([
@ -10,9 +12,9 @@ java_library(
deps = [ deps = [
"//api", "//api",
"//core:internal", "//core:internal",
"@com_google_code_findbugs_jsr305//jar", artifact("com.google.code.findbugs:jsr305"),
"@com_google_guava_guava//jar", artifact("com.google.guava:guava"),
"@com_google_j2objc_j2objc_annotations//jar", artifact("com.google.j2objc:j2objc-annotations"),
"@org_codehaus_mojo_animal_sniffer_annotations//jar", artifact("org.codehaus.mojo:animal-sniffer-annotations"),
], ],
) )

View File

@ -1,3 +1,4 @@
load("@rules_jvm_external//:defs.bzl", "artifact")
load("//:java_grpc_library.bzl", "java_grpc_library") load("//:java_grpc_library.bzl", "java_grpc_library")
# Mirrors the dependencies included in the artifact on Maven Central for usage # Mirrors the dependencies included in the artifact on Maven Central for usage
@ -43,19 +44,19 @@ java_library(
"//stub", "//stub",
"//services:metrics", "//services:metrics",
"//services:metrics_internal", "//services:metrics_internal",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_code_gson_gson//jar",
"@com_google_errorprone_error_prone_annotations//jar",
"@com_google_googleapis//google/rpc:rpc_java_proto", "@com_google_googleapis//google/rpc:rpc_java_proto",
"@com_google_guava_guava//jar",
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
"@com_google_re2j_re2j//jar", artifact("com.google.code.findbugs:jsr305"),
"@io_netty_netty_buffer//jar", artifact("com.google.code.gson:gson"),
"@io_netty_netty_codec//jar", artifact("com.google.errorprone:error_prone_annotations"),
"@io_netty_netty_common//jar", artifact("com.google.guava:guava"),
"@io_netty_netty_handler//jar", artifact("com.google.re2j:re2j"),
"@io_netty_netty_transport//jar", artifact("io.netty:netty-buffer"),
artifact("io.netty:netty-codec"),
artifact("io.netty:netty-common"),
artifact("io.netty:netty-handler"),
artifact("io.netty:netty-transport"),
], ],
) )
@ -150,9 +151,9 @@ java_library(
"//services:metrics", "//services:metrics",
"//services:metrics_internal", "//services:metrics_internal",
"//stub", "//stub",
"@com_google_code_findbugs_jsr305//jar",
"@com_google_guava_guava//jar",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"),
], ],
) )