forked from grpc/grpc-kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
repositories.bzl
64 lines (57 loc) · 2.35 KB
/
repositories.bzl
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
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# For use with maven_install's artifacts.
# maven_install(
# ...
# artifacts = [
# # Your own deps
# ] + IO_GRPC_GRPC_KOTLIN_ARTIFACTS + IO_GRPC_GRPC_JAVA_ARTIFACTS,
# )
IO_GRPC_GRPC_KOTLIN_ARTIFACTS = [
"com.google.guava:guava:29.0-android",
"com.squareup:kotlinpoet:1.14.2",
"org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3",
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.7.3",
"org.jetbrains.kotlinx:kotlinx-coroutines-debug:1.7.3",
]
# For use with maven_install's override_targets.
# maven_install(
# ...
# override_targets = dict(
# IO_GRPC_GRPC_JAVA_OVERRIDE_TARGETS.items() +
# IO_GRPC_GRPC_KOTLIN_OVERRIDE_TARGETS.items(),
# "your.target:artifact": "@//third_party/artifact",
# )
IO_GRPC_GRPC_KOTLIN_OVERRIDE_TARGETS = dict()
# Call this after compat_repositories() to load all dependencies.
def grpc_kt_repositories():
"""Imports dependencies for kt_jvm_grpc.bzl"""
if not native.existing_rule("io_bazel_rules_kotlin"):
io_bazel_rules_kotlin()
if not native.existing_rule("com_google_protobuf"):
com_google_protobuf()
if not native.existing_rule("io_grpc_grpc_java"):
io_grpc_grpc_java()
def io_bazel_rules_kotlin():
rules_kotlin_version = "v1.8"
rules_kotlin_sha = "01293740a16e474669aba5b5a1fe3d368de5832442f164e4fbfc566815a8bc3a"
http_archive(
name = "io_bazel_rules_kotlin",
urls = ["https://github.com/bazelbuild/rules_kotlin/releases/download/%s/rules_kotlin_release.tgz" % rules_kotlin_version],
sha256 = rules_kotlin_sha,
)
def com_google_protobuf():
protobuf_version = "24.2"
protobuf_sha = "39b52572da90ad54c883a828cb2ca68e5ac918aa75d36c3e55c9c76b94f0a4f7"
http_archive(
name = "com_google_protobuf",
sha256 = protobuf_sha,
strip_prefix = "protobuf-%s" % protobuf_version,
urls = ["https://github.com/protocolbuffers/protobuf/releases/download/v%s/protobuf-%s.tar.gz" % (protobuf_version, protobuf_version)],
)
def io_grpc_grpc_java():
http_archive(
name = "io_grpc_grpc_java",
sha256 = "970dcec6c8eb3fc624015f24b98df78f4c857a158fce0617deceafab470b90fc",
strip_prefix = "grpc-java-1.57.2",
url = "https://github.com/grpc/grpc-java/archive/v1.57.2.zip",
)