Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 authored May 20, 2024
1 parent b985760 commit 9996f84
Show file tree
Hide file tree
Showing 6 changed files with 212 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
module(
name = "grpc-httpjson-transcoding",
version = "0.0.0-20230607-ff41eb3",
compatibility_level = 1,
)

bazel_dep(
name = "abseil-cpp",
version = "20240116.2",
repo_name = "com_google_absl",
)
bazel_dep(
name = "googletest",
version = "1.14.0.bcr.1",
repo_name = "com_google_googletest",
dev_dependency = True,
)
bazel_dep(
name = "google_benchmark",
version = "1.8.3",
repo_name = "com_google_benchmark",
dev_dependency = True,
)
bazel_dep(
name = "nlohmann_json",
version = "3.11.3",
repo_name = "com_github_nlohmann_json",
)
bazel_dep(
name = "proto-converter",
version = "0.0.0-20230607-d77ff30",
repo_name = "com_google_protoconverter",
)
bazel_dep(
name = "protobuf",
version = "26.0.bcr.1",
repo_name = "com_google_protobuf",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
bazel_dep(
name = "rules_fuzzing",
version = "0.5.2",
dev_dependency = True,
)
bazel_dep(
name = "rules_proto",
version = "5.3.0-21.7",
)
bazel_dep(
name = "zlib",
version = "1.2.13",
)

# -- bazel_dep definitions -- #

non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
use_repo(non_module_deps, "com_google_googleapis")

googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
use_repo(googleapis_ext, "com_google_googleapis_imports")
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/extensions.bzl b/extensions.bzl
new file mode 100644
index 0000000..8d8228e
--- /dev/null
+++ b/extensions.bzl
@@ -0,0 +1,11 @@
+load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
+
+def _non_module_deps_impl(_ctx):
+ http_archive(
+ name = "com_google_googleapis",
+ url = "https://github.com/googleapis/googleapis/archive/1d5522ad1056f16a6d593b8f3038d831e64daeea.tar.gz",
+ sha256 = "cd13e547cffaad217c942084fd5ae0985a293d0cce3e788c20796e5e2ea54758",
+ strip_prefix = "googleapis-1d5522ad1056f16a6d593b8f3038d831e64daeea",
+ )
+
+non_module_deps = module_extension(implementation = _non_module_deps_impl)
diff --git a/googleapis_ext.bzl b/googleapis_ext.bzl
new file mode 100644
index 0000000..f3c1e15
--- /dev/null
+++ b/googleapis_ext.bzl
@@ -0,0 +1,6 @@
+load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language")
+
+googleapis_ext = module_extension(implementation = lambda x: switched_rules_by_language(
+ name = "com_google_googleapis_imports",
+ cc = True,
+))
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,63 @@
+module(
+ name = "grpc-httpjson-transcoding",
+ version = "0.0.0-20230607-ff41eb3",
+ compatibility_level = 1,
+)
+
+bazel_dep(
+ name = "abseil-cpp",
+ version = "20240116.2",
+ repo_name = "com_google_absl",
+)
+bazel_dep(
+ name = "googletest",
+ version = "1.14.0.bcr.1",
+ repo_name = "com_google_googletest",
+ dev_dependency = True,
+)
+bazel_dep(
+ name = "google_benchmark",
+ version = "1.8.3",
+ repo_name = "com_google_benchmark",
+ dev_dependency = True,
+)
+bazel_dep(
+ name = "nlohmann_json",
+ version = "3.11.3",
+ repo_name = "com_github_nlohmann_json",
+)
+bazel_dep(
+ name = "proto-converter",
+ version = "0.0.0-20230607-d77ff30",
+ repo_name = "com_google_protoconverter",
+)
+bazel_dep(
+ name = "protobuf",
+ version = "26.0.bcr.1",
+ repo_name = "com_google_protobuf",
+)
+bazel_dep(
+ name = "rules_cc",
+ version = "0.0.9",
+)
+bazel_dep(
+ name = "rules_fuzzing",
+ version = "0.5.2",
+ dev_dependency = True,
+)
+bazel_dep(
+ name = "rules_proto",
+ version = "5.3.0-21.7",
+)
+bazel_dep(
+ name = "zlib",
+ version = "1.2.13",
+)
+
+# -- bazel_dep definitions -- #
+
+non_module_deps = use_extension("//:extensions.bzl", "non_module_deps")
+use_repo(non_module_deps, "com_google_googleapis")
+
+googleapis_ext = use_extension("//:googleapis_ext.bzl", "googleapis_ext")
+use_repo(googleapis_ext, "com_google_googleapis_imports")
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
bazel:
- 7.x
- 6.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=-std=c++17'
- '--host_cxxopt=-std=c++17'
build_targets:
- '@grpc-httpjson-transcoding//src/...'
verify_windows_targets:
name: Verify build targets
platform: windows
bazel: ${{ bazel }}
build_flags:
- '--cxxopt=/std:c++17'
- '--host_cxxopt=/std:c++17'
build_targets:
- '@grpc-httpjson-transcoding//src/...'
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/grpc-ecosystem/grpc-httpjson-transcoding/archive/ff41eb3fc9209e6197595b54f7addfa244c0bdb6.tar.gz",
"integrity": "sha256-3qZrPS38FQNzaX4lsTJ4d+C3SA3Cus//Hj/XqgCxJ5A=",
"strip_prefix": "grpc-httpjson-transcoding-ff41eb3fc9209e6197595b54f7addfa244c0bdb6",
"patches": {
"grpc-httpjson-transcoding.patch": "sha256-j0m2H8WbAUMzFH1AkwcLP8zVmcvjMgRtM20IPJk0gno=",
"module_dot_bazel.patch": "sha256-9zaHfn3zheZzU3l0w/N2r0p+BsC7wTa/jCLeMcwLnYY="
},
"patch_strip": 1
}
16 changes: 16 additions & 0 deletions modules/grpc-httpjson-transcoding/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/grpc-ecosystem/grpc-httpjson-transcoding",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:grpc-ecosystem/grpc-httpjson-transcoding"
],
"versions": [
"0.0.0-20230607-ff41eb3"
],
"yanked_versions": {}
}

0 comments on commit 9996f84

Please sign in to comment.