-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMODULE.bazel
145 lines (131 loc) · 5.18 KB
/
MODULE.bazel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
# Copyright 2023 Aalyria Technologies, Inc., and its affiliates.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
module(name = "aalyria_api")
bazel_dep(name = "protobuf", version = "29.0-rc3")
bazel_dep(name = "gazelle", version = "0.40.0")
bazel_dep(name = "googleapis", version = "0.0.0-20240819-fe8ba054a")
bazel_dep(name = "rules_go", version = "0.50.1")
bazel_dep(name = "rules_java", version = "7.12.2")
bazel_dep(name = "rules_jvm_external", version = "6.3")
bazel_dep(name = "rules_oci", version = "1.7.5")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_proto_grpc_cpp", version = "5.0.0")
bazel_dep(name = "rules_proto_grpc_doc", version = "5.0.0")
bazel_dep(name = "rules_proto_grpc_java", version = "5.0.0")
bazel_dep(name = "rules_proto_grpc_python", version = "5.0.0")
# Patch rules_proto_gprc_python to use python protobuf v28.2
archive_override(
module_name = "rules_proto_grpc_python",
integrity = "sha256-b9r/nAMUoakRmZn2IlVYhaNYgNUXeWHGV4wgd2cCmV8=",
patch_strip = 1,
patches = [
"//patches:rules_proto_grpc_python.patch",
],
strip_prefix = "rules_proto_grpc_python-5.0.0",
urls = "https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/5.0.0/rules_proto_grpc_python-5.0.0.tar.gz",
)
bazel_dep(name = "rules_python", version = "0.35.0")
bazel_dep(name = "toolchains_protoc", version = "0.3.6")
# Configure the protoc toolchain used by rules_proto_grpc to use protoc v28.2.
# This ensures that the version agrees with the protobuf dependency version,
# which is necessary because Protobuf C++ requires an exact match between its
# generated code version and its runtime version.
# (https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp)
protoc = use_extension("@toolchains_protoc//protoc:extensions.bzl", "protoc")
protoc.toolchain(
google_protobuf = "com_google_protobuf",
version = "v29.0-rc3",
)
bazel_dep(name = "container_structure_test", version = "1.16.0", dev_dependency = True)
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"com.google.code.gson:gson:2.10.1",
"com.google.googlejavaformat:google-java-format:1.17.0",
"com.google.guava:guava:33.3.0-jre",
"io.grpc:grpc-testing:1.66.0",
"io.helidon.grpc:helidon-grpc-core:3.2.5",
"junit:junit:4.13.2",
"org.bouncycastle:bcprov-jdk15on:1.70",
"org.mockito:mockito-core:4.5.1",
],
repositories = [
"https://repo.maven.apache.org/maven2/",
],
)
use_repo(maven, "maven")
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(
version = "1.23.4",
)
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
go_deps,
"com_github_fullstorydev_grpcurl",
"com_github_golang_jwt_jwt_v5",
"com_github_google_go_cmp",
"com_github_google_uuid",
"com_github_jhump_protoreflect",
"com_github_jonboulle_clockwork",
"com_github_prometheus_client_model",
"com_github_prometheus_prom2json",
"com_github_rs_zerolog",
"com_github_urfave_cli_v2",
"com_github_vishvananda_netlink",
"io_opentelemetry_go_contrib_instrumentation_google_golang_org_grpc_otelgrpc",
"io_opentelemetry_go_otel",
"io_opentelemetry_go_otel_exporters_otlp_otlptrace_otlptracegrpc",
"io_opentelemetry_go_otel_sdk",
"io_opentelemetry_go_otel_trace",
"org_golang_google_genproto",
"org_golang_google_genproto_googleapis_rpc",
"org_golang_google_grpc",
"org_golang_google_protobuf",
"org_golang_x_sync",
"org_golang_x_sys",
)
switched_rules = use_extension("@googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(
cc = True,
java = True,
python = True,
)
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.11",
)
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "python_deps",
python_version = "3.11",
requirements_lock = "//:requirements.txt",
)
use_repo(pip, "python_deps")
oci = use_extension("@rules_oci//oci:extensions.bzl", "oci")
oci.pull(
name = "alpine_base",
# docker.io/library/alpine:3.19.1
digest = "sha256:c5b1261d6d3e43071626931fc004f70149baeba2c8ec672bd4f27761f8e1ad6b", # 3.19.1 2024-01-26
image = "docker.io/library/alpine",
platforms = ["linux/amd64"],
)
use_repo(oci, "alpine_base")
bazel_dep(name = "org_outernetcouncil_nmts")
archive_override(
module_name = "org_outernetcouncil_nmts",
strip_prefix = "nmts-1.0.0-alpha.2",
urls = "https://github.com/outernetcouncil/nmts/archive/refs/tags/v1.0.0-alpha.2.tar.gz",
)