bazel: Fix formatting with buildifier

Keys and dependencies are sorted.
This commit is contained in:
Eric Anderson 2024-04-04 10:49:00 -07:00
parent d1890c0acc
commit 32d48ae89a
6 changed files with 47 additions and 18 deletions

View File

@ -1,19 +1,20 @@
module( module(
name = "grpc-java", name = "grpc-java",
version = "0",
compatibility_level = 0, compatibility_level = 0,
repo_name = "io_grpc_grpc_java", repo_name = "io_grpc_grpc_java",
version = "0",
) )
bazel_dep(name = "googleapis", version = "0.0.0-20240326-1c8d509c5", repo_name = "com_google_googleapis") bazel_dep(name = "googleapis", repo_name = "com_google_googleapis", version = "0.0.0-20240326-1c8d509c5")
bazel_dep(name = "grpc", version = "1.56.3.bcr.1", repo_name = "com_github_grpc_grpc") bazel_dep(name = "grpc", repo_name = "com_github_grpc_grpc", version = "1.56.3.bcr.1")
bazel_dep(name = "protobuf", version = "23.1", repo_name = "com_google_protobuf") bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "23.1")
bazel_dep(name = "rules_cc", version = "0.0.9") bazel_dep(name = "rules_cc", version = "0.0.9")
bazel_dep(name = "rules_go", version = "0.46.0", repo_name = "io_bazel_rules_go") bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.46.0")
bazel_dep(name = "rules_jvm_external", version = "6.0") bazel_dep(name = "rules_jvm_external", version = "6.0")
bazel_dep(name = "rules_proto", version = "5.3.0-21.7") bazel_dep(name = "rules_proto", version = "5.3.0-21.7")
non_module_deps = use_extension("//:repositories.bzl", "grpc_java_repositories_extension") non_module_deps = use_extension("//:repositories.bzl", "grpc_java_repositories_extension")
use_repo( use_repo(
non_module_deps, non_module_deps,
"com_github_cncf_xds", "com_github_cncf_xds",
@ -22,6 +23,7 @@ use_repo(
) )
grpc_repo_deps_ext = use_extension("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_repo_deps_ext") grpc_repo_deps_ext = use_extension("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_repo_deps_ext")
use_repo( use_repo(
grpc_repo_deps_ext, grpc_repo_deps_ext,
"com_envoyproxy_protoc_gen_validate", "com_envoyproxy_protoc_gen_validate",
@ -30,6 +32,7 @@ use_repo(
) )
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install( maven.install(
artifacts = [ artifacts = [
"com.google.android:annotations:4.1.1.4", "com.google.android:annotations:4.1.1.4",
@ -73,100 +76,126 @@ maven.install(
], ],
strict_visibility = True, strict_visibility = True,
) )
use_repo(maven, "maven") use_repo(maven, "maven")
maven.override( maven.override(
coordinates = "com.google.protobuf:protobuf-java", coordinates = "com.google.protobuf:protobuf-java",
target = "@com_google_protobuf//:protobuf_java", target = "@com_google_protobuf//:protobuf_java",
) )
maven.override( maven.override(
coordinates = "com.google.protobuf:protobuf-java-util", coordinates = "com.google.protobuf:protobuf-java-util",
target = "@com_google_protobuf//:protobuf_java_util", target = "@com_google_protobuf//:protobuf_java_util",
) )
maven.override( maven.override(
coordinates = "com.google.protobuf:protobuf-javalite", coordinates = "com.google.protobuf:protobuf-javalite",
target = "@com_google_protobuf//:protobuf_javalite", target = "@com_google_protobuf//:protobuf_javalite",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-alts", coordinates = "io.grpc:grpc-alts",
target = "@io_grpc_grpc_java//alts", target = "@io_grpc_grpc_java//alts",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-api", coordinates = "io.grpc:grpc-api",
target = "@io_grpc_grpc_java//api", target = "@io_grpc_grpc_java//api",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-auth", coordinates = "io.grpc:grpc-auth",
target = "@io_grpc_grpc_java//auth", target = "@io_grpc_grpc_java//auth",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-census", coordinates = "io.grpc:grpc-census",
target = "@io_grpc_grpc_java//census", target = "@io_grpc_grpc_java//census",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-context", coordinates = "io.grpc:grpc-context",
target = "@io_grpc_grpc_java//context", target = "@io_grpc_grpc_java//context",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-core", coordinates = "io.grpc:grpc-core",
target = "@io_grpc_grpc_java//core:core_maven", target = "@io_grpc_grpc_java//core:core_maven",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-googleapis", coordinates = "io.grpc:grpc-googleapis",
target = "@io_grpc_grpc_java//googleapis", target = "@io_grpc_grpc_java//googleapis",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-grpclb", coordinates = "io.grpc:grpc-grpclb",
target = "@io_grpc_grpc_java//grpclb", target = "@io_grpc_grpc_java//grpclb",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-inprocess", coordinates = "io.grpc:grpc-inprocess",
target = "@io_grpc_grpc_java//inprocess", target = "@io_grpc_grpc_java//inprocess",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-netty", coordinates = "io.grpc:grpc-netty",
target = "@io_grpc_grpc_java//netty", target = "@io_grpc_grpc_java//netty",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-netty-shaded", coordinates = "io.grpc:grpc-netty-shaded",
target = "@io_grpc_grpc_java//netty:shaded_maven", target = "@io_grpc_grpc_java//netty:shaded_maven",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-okhttp", coordinates = "io.grpc:grpc-okhttp",
target = "@io_grpc_grpc_java//okhttp", target = "@io_grpc_grpc_java//okhttp",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-protobuf", coordinates = "io.grpc:grpc-protobuf",
target = "@io_grpc_grpc_java//protobuf", target = "@io_grpc_grpc_java//protobuf",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-protobuf-lite", coordinates = "io.grpc:grpc-protobuf-lite",
target = "@io_grpc_grpc_java//protobuf-lite", target = "@io_grpc_grpc_java//protobuf-lite",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-rls", coordinates = "io.grpc:grpc-rls",
target = "@io_grpc_grpc_java//rls", target = "@io_grpc_grpc_java//rls",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-services", coordinates = "io.grpc:grpc-services",
target = "@io_grpc_grpc_java//services:services_maven", target = "@io_grpc_grpc_java//services:services_maven",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-stub", coordinates = "io.grpc:grpc-stub",
target = "@io_grpc_grpc_java//stub", target = "@io_grpc_grpc_java//stub",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-testing", coordinates = "io.grpc:grpc-testing",
target = "@io_grpc_grpc_java//testing", target = "@io_grpc_grpc_java//testing",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-xds", coordinates = "io.grpc:grpc-xds",
target = "@io_grpc_grpc_java//xds:xds_maven", target = "@io_grpc_grpc_java//xds:xds_maven",
) )
maven.override( maven.override(
coordinates = "io.grpc:grpc-util", coordinates = "io.grpc:grpc-util",
target = "@io_grpc_grpc_java//util", target = "@io_grpc_grpc_java//util",
) )
switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules") switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(java = True) switched_rules.use_languages(java = True)
use_repo(switched_rules, "com_google_googleapis_imports") use_repo(switched_rules, "com_google_googleapis_imports")

View File

@ -36,8 +36,8 @@ java_library(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
":alts_internal", ":alts_internal",
":handshaker_java_proto",
":handshaker_java_grpc", ":handshaker_java_grpc",
":handshaker_java_proto",
"//api", "//api",
"//auth", "//auth",
"//core:internal", "//core:internal",

View File

@ -7,11 +7,11 @@ java_library(
]), ]),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
deps = [ deps = [
"//api", "//api",
"//context", "//context",
artifact("com.google.code.findbugs:jsr305"), artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"), artifact("com.google.guava:guava"),
artifact("io.opencensus:opencensus-api"), artifact("io.opencensus:opencensus-api"),
artifact("io.opencensus:opencensus-contrib-grpc-metrics"), artifact("io.opencensus:opencensus-contrib-grpc-metrics"),
], ],
) )

View File

@ -97,8 +97,8 @@ java_library(
"@io_grpc_grpc_java//services:health", "@io_grpc_grpc_java//services:health",
"@io_grpc_grpc_java//services:healthlb", "@io_grpc_grpc_java//services:healthlb",
"@io_grpc_grpc_java//stub", "@io_grpc_grpc_java//stub",
"@io_grpc_grpc_proto//:health_proto",
"@io_grpc_grpc_proto//:health_java_proto", "@io_grpc_grpc_proto//:health_java_proto",
"@io_grpc_grpc_proto//:health_proto",
"@maven//:com_google_api_grpc_proto_google_common_protos", "@maven//:com_google_api_grpc_proto_google_common_protos",
"@maven//:com_google_code_findbugs_jsr305", "@maven//:com_google_code_findbugs_jsr305",
"@maven//:com_google_code_gson_gson", "@maven//:com_google_code_gson_gson",

View File

@ -15,8 +15,8 @@ java_library(
"//api", "//api",
"//context", "//context",
"//core:internal", "//core:internal",
"//util",
"//stub", "//stub",
"//util",
"@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.code.findbugs:jsr305"),

View File

@ -32,18 +32,18 @@ java_library(
":envoy_service_load_stats_v2_java_grpc", ":envoy_service_load_stats_v2_java_grpc",
":envoy_service_load_stats_v3_java_grpc", ":envoy_service_load_stats_v3_java_grpc",
":envoy_service_status_v3_java_grpc", ":envoy_service_status_v3_java_grpc",
":xds_protos_java",
":orca", ":orca",
":xds_protos_java",
"//:auto_value_annotations", "//:auto_value_annotations",
"//alts", "//alts",
"//api", "//api",
"//context", "//context",
"//core:internal", "//core:internal",
"//util",
"//netty", "//netty",
"//stub",
"//services:metrics", "//services:metrics",
"//services:metrics_internal", "//services:metrics_internal",
"//stub",
"//util",
"@com_google_googleapis//google/rpc:rpc_java_proto", "@com_google_googleapis//google/rpc:rpc_java_proto",
"@com_google_protobuf//:protobuf_java", "@com_google_protobuf//:protobuf_java",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
@ -146,11 +146,11 @@ java_library(
"//api", "//api",
"//context", "//context",
"//core:internal", "//core:internal",
"//util",
"//protobuf", "//protobuf",
"//services:metrics", "//services:metrics",
"//services:metrics_internal", "//services:metrics_internal",
"//stub", "//stub",
"//util",
"@com_google_protobuf//:protobuf_java_util", "@com_google_protobuf//:protobuf_java_util",
artifact("com.google.code.findbugs:jsr305"), artifact("com.google.code.findbugs:jsr305"),
artifact("com.google.guava:guava"), artifact("com.google.guava:guava"),