-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathWORKSPACE
91 lines (71 loc) · 2.47 KB
/
WORKSPACE
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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "rules_jvm_external",
sha256 = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca",
strip_prefix = "rules_jvm_external-4.2",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/4.2.zip",
)
http_archive(
name = "com_github_grpc_grpc_kotlin",
strip_prefix = "grpc-kotlin-1.3.0",
url = "https://github.com/grpc/grpc-kotlin/archive/refs/tags/v1.3.0.zip",
)
load("@rules_jvm_external//:defs.bzl", "maven_install")
load(
"@com_github_grpc_grpc_kotlin//:repositories.bzl",
"IO_GRPC_GRPC_KOTLIN_ARTIFACTS",
"IO_GRPC_GRPC_KOTLIN_OVERRIDE_TARGETS",
"grpc_kt_repositories",
"io_grpc_grpc_java",
)
io_grpc_grpc_java()
load(
"@io_grpc_grpc_java//:repositories.bzl",
"IO_GRPC_GRPC_JAVA_ARTIFACTS",
"IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS",
"grpc_java_repositories",
)
# Maven
maven_install(
artifacts = [
"com.google.jimfs:jimfs:1.1",
"com.google.truth.extensions:truth-proto-extension:1.0.1",
"com.google.protobuf:protobuf-kotlin:3.18.0",
] + IO_GRPC_GRPC_KOTLIN_ARTIFACTS + IO_GRPC_GRPC_JAVA_ARTIFACTS,
override_targets = dict(
IO_GRPC_GRPC_KOTLIN_OVERRIDE_TARGETS.items() +
IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS.items(),
),
repositories = [
"https://repo.maven.apache.org/maven2/",
],
generate_compat_repositories = True,
)
load("@maven//:compat.bzl", "compat_repositories")
compat_repositories()
# gRPC
grpc_kt_repositories()
grpc_java_repositories()
# Protocol Buffers
load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")
protobuf_deps()
# Kotlin
load("@io_bazel_rules_kotlin//kotlin:repositories.bzl", "kotlin_repositories")
kotlin_repositories()
load("@io_bazel_rules_kotlin//kotlin:core.bzl", "kt_register_toolchains")
kt_register_toolchains()
# Needed for the googleapis protos.
# Version of googleapis is taken from remote-apis repository
# to ensure compatibility.
http_archive(
name = "googleapis",
sha256 = "f25472e77c059ebcda01fd241bf5d6094b62747cafa8e939ac776c16069e5852",
strip_prefix = "googleapis-01d4201e2620da2084d2151522c25cf49dda9da3",
urls = ["https://github.com/googleapis/googleapis/archive/01d4201e2620da2084d2151522c25cf49dda9da3.zip"],
)
load("@googleapis//:repository_rules.bzl", "switched_rules_by_language")
switched_rules_by_language(
name = "com_google_googleapis_imports",
grpc = True,
java = True,
)