@@ -2,81 +2,85 @@ workspace(name = "bazel_remote_apis")
22
33load ("@bazel_tools//tools/build_defs/repo:http.bzl" , "http_archive" )
44
5+ _bazel_skylib_version = "1.4.0"
6+
7+ _bazel_skylib_sha256 = "f24ab666394232f834f74d19e2ff142b0af17466ea0c69a3f4c276ee75f6efce"
8+
59http_archive (
610 name = "bazel_skylib" ,
7- sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44" ,
8- urls = [
9- "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz" ,
10- "https://github.com/bazelbuild/bazel-skylib/releases/download/1.0.2/bazel-skylib-1.0.2.tar.gz" ,
11- ],
11+ sha256 = _bazel_skylib_sha256 ,
12+ urls = ["https://github.com/bazelbuild/bazel-skylib/releases/download/{0}/bazel-skylib-{0}.tar.gz" .format (_bazel_skylib_version )],
1213)
1314
1415load ("@bazel_skylib//:workspace.bzl" , "bazel_skylib_workspace" )
1516
1617bazel_skylib_workspace ()
1718
18- # Pull in go rules, which we need in order to selectively pull in Go dependencies.
19+ # This must be above the download of gRPC (in C++ section) and
20+ # rules_gapic_repositories because both depend on rules_go and we need to manage
21+ # our version of rules_go explicitly rather than depend on the version those
22+ # bring in transitively.
23+ _io_bazel_rules_go_version = "0.34.0"
24+
1925http_archive (
2026 name = "io_bazel_rules_go" ,
21- sha256 = "69de5c704a05ff37862f7e0f5534d4f479418afc21806c887db544a316f3cb6b " ,
27+ sha256 = "16e9fca53ed6bd4ff4ad76facc9b7b651a89db1689a2877d6fd7b82aa824e366 " ,
2228 urls = [
23- "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.27.0 /rules_go-v0.27.0.tar.gz" ,
24- "https://github.com/bazelbuild/rules_go/releases/download/v0.27.0 /rules_go-v0.27.0.tar.gz" ,
29+ "https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v{0} /rules_go-v{0}.zip" . format ( _io_bazel_rules_go_version ) ,
30+ "https://github.com/bazelbuild/rules_go/releases/download/v{0} /rules_go-v{0}.zip" . format ( _io_bazel_rules_go_version ) ,
2531 ],
2632)
2733
28- # Gazelle, which we need in order to selectively pull in Gazelle dependencies for Go.
34+ # Gazelle dependency version should match gazelle dependency expected by gRPC
35+ _bazel_gazelle_version = "0.24.0"
36+
2937http_archive (
3038 name = "bazel_gazelle" ,
31- sha256 = "62ca106be173579c0a167deb23358fdfe71ffa1e4cfdddf5582af26520f1c66f " ,
39+ sha256 = "de69a09dc70417580aabf20a28619bb3ef60d038470c7cf8442fafcf627c21cb " ,
3240 urls = [
33- "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0 /bazel-gazelle-v0.23.0 .tar.gz" ,
34- "https://github.com/bazelbuild/bazel-gazelle/releases/download/v0.23.0 /bazel-gazelle-v0.23.0 .tar.gz" ,
41+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-gazelle/releases/download/v{0} /bazel-gazelle-v{0} .tar.gz" . format ( _bazel_gazelle_version ) ,
42+ "https://github.com/bazelbuild/bazel-gazelle/releases/download/v{0} /bazel-gazelle-v{0} .tar.gz" . format ( _bazel_gazelle_version ) ,
3543 ],
3644)
3745
38- # Needed for protobuf.
46+ # Explicitly declaring Protobuf version, while Protobuf dependency is already
47+ # instantiated in grpc_deps().
3948http_archive (
4049 name = "com_google_protobuf" ,
41- sha256 = "678d91d8a939a1ef9cb268e1f20c14cd55e40361dc397bb5881e4e1e532679b1 " ,
42- strip_prefix = "protobuf-3.10.1 " ,
43- urls = ["https://github.com/protocolbuffers/protobuf/archive/v3.10.1.zip " ],
50+ sha256 = "0b0395d34e000f1229679e10d984ed7913078f3dd7f26cf0476467f5e65716f4 " ,
51+ strip_prefix = "protobuf-23.2 " ,
52+ urls = ["https://github.com/protocolbuffers/protobuf/archive/v23.2.tar.gz " ],
4453)
4554
46- load ( "@com_google_protobuf//:protobuf_deps.bzl" , "protobuf_deps" )
55+ _grpc_version = "1.55.1"
4756
48- protobuf_deps ()
57+ _grpc_sha256 = "17c0685da231917a7b3be2671a7b13b550a85fdda5e475313264c5f51c4da3f8"
4958
50- # Needed for C++ gRPC.
5159http_archive (
5260 name = "com_github_grpc_grpc" ,
53- sha256 = "b391a327429279f6f29b9ae7e5317cd80d5e9d49cc100e6d682221af73d984a6" ,
54- strip_prefix = "grpc-93e8830070e9afcbaa992c75817009ee3f4b63a0" , # v1.24.3 with fixes
55- urls = ["https://github.com/grpc/grpc/archive/93e8830070e9afcbaa992c75817009ee3f4b63a0 .zip" ],
61+ sha256 = _grpc_sha256 ,
62+ strip_prefix = "grpc-%s" % _grpc_version ,
63+ urls = ["https://github.com/grpc/grpc/archive/v%s .zip" % _grpc_version ],
5664)
5765
5866# Pull in all gRPC dependencies.
5967load ("@com_github_grpc_grpc//bazel:grpc_deps.bzl" , "grpc_deps" )
6068
6169grpc_deps ()
6270
71+ load ("@com_google_protobuf//:protobuf_deps.bzl" , "protobuf_deps" )
72+
73+ protobuf_deps ()
74+
75+
6376# More gRPC dependencies. grpc_extra_deps does not work out of the box.
64- load ("@upb//bazel:workspace_deps.bzl" , "upb_deps" )
6577load ("@build_bazel_rules_apple//apple:repositories.bzl" , "apple_rules_dependencies" )
6678load ("@build_bazel_apple_support//lib:repositories.bzl" , "apple_support_dependencies" )
6779
68- upb_deps ()
69-
7080apple_rules_dependencies ()
7181
7282apple_support_dependencies ()
7383
74- load ("@upb//bazel:repository_defs.bzl" , "bazel_version_repository" )
75-
76- bazel_version_repository (
77- name = "bazel_version" ,
78- )
79-
8084bind (
8185 name = "grpc_cpp_plugin" ,
8286 actual = "@com_github_grpc_grpc//:grpc_cpp_plugin" ,
@@ -91,11 +95,31 @@ load("//:remote_apis_deps.bzl", "remote_apis_go_deps")
9195
9296remote_apis_go_deps ()
9397
98+ _rules_gapic_version = "0.28.0"
99+
100+ _rules_gapic_sha256 = "921aebfb7f26c110fcdafeb6b74b1eb2d114a6d52e1bc11d6c1c011cf1da2017"
101+
102+ http_archive (
103+ name = "rules_gapic" ,
104+ sha256 = _rules_gapic_sha256 ,
105+ strip_prefix = "rules_gapic-%s" % _rules_gapic_version ,
106+ urls = ["https://github.com/googleapis/rules_gapic/archive/v%s.tar.gz" % _rules_gapic_version ],
107+ )
108+
94109# Needed for the googleapis protos.
95110http_archive (
96111 name = "googleapis" ,
97- build_file = "BUILD.googleapis" ,
98- sha256 = "7b6ea252f0b8fb5cd722f45feb83e115b689909bbb6a393a873b6cbad4ceae1d" ,
99- strip_prefix = "googleapis-143084a2624b6591ee1f9d23e7f5241856642f4d" ,
100- urls = ["https://github.com/googleapis/googleapis/archive/143084a2624b6591ee1f9d23e7f5241856642f4d.zip" ],
112+ sha256 = "1253e1e9826fa822d709221032069dbbc5079e3d26671bfcb8485b21870941d3" ,
113+ strip_prefix = "googleapis-b34897064113f06083e6d5bd217826ec2c91abe3" ,
114+ urls = ["https://github.com/googleapis/googleapis/archive/b34897064113f06083e6d5bd217826ec2c91abe3.zip" ],
115+ )
116+
117+ load ("@googleapis//:repository_rules.bzl" , "switched_rules_by_language" )
118+
119+ switched_rules_by_language (
120+ name = "com_google_googleapis_imports" ,
121+ cc = True ,
122+ gapic = True ,
123+ go = True ,
124+ java = True ,
101125)
0 commit comments