Skip to content

Commit

Permalink
switch to bazelmod
Browse files Browse the repository at this point in the history
  • Loading branch information
ratnikov committed Jun 8, 2024
1 parent 54e048d commit b72ec86
Show file tree
Hide file tree
Showing 5 changed files with 9,051 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
build --cxxopt=-std=c++14 --host_cxxopt=-std=c++14
common --enable_bzlmod
2 changes: 1 addition & 1 deletion .bazelversion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.3.2
7.1.2
46 changes: 46 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
module(
name = "grpc-kotlin",
version = "0.0.0",
repo_name = "com_github_grpc_grpc_kotlin",
)

bazel_dep(name = "rules_jvm_external", version = "6.1")
bazel_dep(name = "rules_proto", version = "6.0.0")
bazel_dep(
name = "grpc-java",
version = "1.62.2",
repo_name = "io_grpc_grpc_java",
)
bazel_dep(
name = "protobuf",
version = "24.4", # Latest doesn't seem to work. TODO: Pick the latest working version...
repo_name = "com_google_protobuf",
)
bazel_dep(name = "rules_kotlin", version = "1.9.5", repo_name = "io_bazel_rules_kotlin")

IO_GRPC_GRPC_KOTLIN_ARTIFACTS = [
"com.google.guava:guava:32.0.1-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",
]

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"io.grpc:protoc-gen-grpc-kotlin:1.4.1",
"com.google.jimfs:jimfs:1.3.0",
"com.google.truth.extensions:truth-proto-extension:1.1.3",
"com.google.protobuf:protobuf-kotlin:4.27.1",
] + IO_GRPC_GRPC_KOTLIN_ARTIFACTS,
generate_compat_repositories = True,
repositories = [
"https://repo.maven.apache.org/maven2/",
],
)
use_repo(
maven,
"com_google_guava_guava",
"maven",
)
Loading

0 comments on commit b72ec86

Please sign in to comment.