Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
mmorel-35 committed May 7, 2024
1 parent c29d48b commit 8966fb1
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 0 deletions.
64 changes: 64 additions & 0 deletions modules/google-cloud-cpp/2.16.0/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
module(
name = "google-cloud-cpp",
version = "2.16.0",
bazel_compatibility = [
">=7.0.0",
],
compatibility_level = 1,
repo_name = "google_cloud_cpp",
)

bazel_dep(
name = "abseil-cpp",
version = "20230802.1",
repo_name = "com_google_absl",
)
bazel_dep(
name = "bazel_skylib",
version = "1.5.0",
)
bazel_dep(
name = "boringssl",
version = "0.0.0-20230215-5c22014",
)
bazel_dep(
name = "curl",
version = "8.4.0.bcr.1",
repo_name = "com_github_curl_curl",
)
bazel_dep(
name = "googleapis",
version = "0.0.0-20240326-1c8d509c5",
repo_name = "com_google_googleapis",
)
bazel_dep(
name = "grpc",
version = "1.62.1",
repo_name = "com_github_grpc_grpc",
)
bazel_dep(
name = "nlohmann_json",
version = "3.11.2",
repo_name = "com_github_nlohmann_json",
)
bazel_dep(
name = "opentelemetry-cpp",
version = "1.14.2",
repo_name = "io_opentelemetry_cpp",
)
bazel_dep(
name = "platforms",
version = "0.0.9",
)
bazel_dep(
name = "rules_cc",
version = "0.0.9",
)
# -- bazel_dep definitions -- #

switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
switched_rules.use_languages(
cc = True,
grpc = True,
)
use_repo(switched_rules, "com_google_googleapis_imports")
115 changes: 115 additions & 0 deletions modules/google-cloud-cpp/2.16.0/patches/google-cloud-cpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
diff --git a/bazel/google_cloud_cpp_deps.bzl b/bazel/google_cloud_cpp_deps.bzl
index c79b344d85..5d86658bc1 100644
--- a/bazel/google_cloud_cpp_deps.bzl
+++ b/bazel/google_cloud_cpp_deps.bzl
@@ -247,7 +247,6 @@ def google_cloud_cpp_deps(name = None):
],
sha256 = "d69f9deb6a75e2580465c6c4c5111b89c4dc2fa94e3a85fcd2ffcd9a143d9273",
strip_prefix = "json-3.11.2",
- build_file = Label("//bazel:nlohmann_json.BUILD"),
)

# Load google/crc32c, a library to efficiently compute CRC32C checksums.
diff --git a/bazel/nlohmann_json.BUILD b/bazel/nlohmann_json.BUILD
deleted file mode 100644
index c59be3ccf0..0000000000
--- a/bazel/nlohmann_json.BUILD
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2020 Google LLC
-#
-# 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
-#
-# https://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.
-
-package(default_visibility = ["//visibility:public"])
-
-licenses(["notice"]) # Apache 2.0
-
-cc_library(
- name = "nlohmann_json",
- hdrs = glob([
- "include/nlohmann/*.hpp",
- "include/nlohmann/**/*.hpp",
- ]),
- includes = ["include"],
- visibility = ["//visibility:public"],
-)
diff --git a/docfx/BUILD.bazel b/docfx/BUILD.bazel
index dcb5eef07f..2960304936 100644
--- a/docfx/BUILD.bazel
+++ b/docfx/BUILD.bazel
@@ -32,7 +32,7 @@ cc_library(
}),
deps = [
"@com_github_jbeder_yaml_cpp//:yaml-cpp",
- "@com_github_nlohmann_json//:nlohmann_json",
+ "@com_github_nlohmann_json//:json",
"@com_github_zeux_pugixml//:pugixml",
],
)
@@ -50,7 +50,7 @@ cc_library(
deps = [
":docfx",
"@com_github_jbeder_yaml_cpp//:yaml-cpp",
- "@com_github_nlohmann_json//:nlohmann_json",
+ "@com_github_nlohmann_json//:json",
"@com_github_zeux_pugixml//:pugixml",
],
)
diff --git a/generator/BUILD.bazel b/generator/BUILD.bazel
index 60be2c158d..319b9a42da 100644
--- a/generator/BUILD.bazel
+++ b/generator/BUILD.bazel
@@ -34,7 +34,7 @@ cc_library(
"//:common",
"//google/cloud:google_cloud_cpp_rest_internal",
"@com_github_jbeder_yaml_cpp//:yaml-cpp",
- "@com_github_nlohmann_json//:nlohmann_json",
+ "@com_github_nlohmann_json//:json",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/strings:str_format",
"@com_google_googleapis//:googleapis_system_includes",
diff --git a/google/cloud/BUILD.bazel b/google/cloud/BUILD.bazel
index 848c715d73..8ee22312cf 100644
--- a/google/cloud/BUILD.bazel
+++ b/google/cloud/BUILD.bazel
@@ -292,7 +292,7 @@ cc_library(
"@boringssl//:crypto",
"@boringssl//:ssl",
"@com_github_curl_curl//:curl",
- "@com_github_nlohmann_json//:nlohmann_json",
+ "@com_github_nlohmann_json//:json",
"@com_google_absl//absl/functional:function_ref",
"@com_google_absl//absl/types:span",
],
diff --git a/google/cloud/storage/BUILD.bazel b/google/cloud/storage/BUILD.bazel
index 5f11ee1f22..95c813bfba 100644
--- a/google/cloud/storage/BUILD.bazel
+++ b/google/cloud/storage/BUILD.bazel
@@ -63,7 +63,7 @@ cc_library(
"@boringssl//:ssl",
"@com_github_curl_curl//:curl",
"@com_github_google_crc32c//:crc32c",
- "@com_github_nlohmann_json//:nlohmann_json",
+ "@com_github_nlohmann_json//:json",
"@com_google_absl//absl/algorithm:container",
"@com_google_absl//absl/strings",
"@com_google_absl//absl/time",
@@ -120,7 +120,7 @@ cc_library(
"@boringssl//:ssl",
"@com_github_curl_curl//:curl",
"@com_github_google_crc32c//:crc32c",
- "@com_github_nlohmann_json//:nlohmann_json",
+ "@com_github_nlohmann_json//:json",
"@com_google_absl//absl/strings:cord",
"@com_google_absl//absl/strings:str_format",
"@com_google_absl//absl/time",
67 changes: 67 additions & 0 deletions modules/google-cloud-cpp/2.16.0/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
--- a/MODULE.bazel
+++ a/MODULE.bazel
@@ -0,0 +1,64 @@
+module(
+ name = "google-cloud-cpp",
+ version = "2.16.0",
+ bazel_compatibility = [
+ ">=7.0.0",
+ ],
+ compatibility_level = 1,
+ repo_name = "google_cloud_cpp",
+)
+
+bazel_dep(
+ name = "abseil-cpp",
+ version = "20230802.1",
+ repo_name = "com_google_absl",
+)
+bazel_dep(
+ name = "bazel_skylib",
+ version = "1.5.0",
+)
+bazel_dep(
+ name = "boringssl",
+ version = "0.0.0-20230215-5c22014",
+)
+bazel_dep(
+ name = "curl",
+ version = "8.4.0.bcr.1",
+ repo_name = "com_github_curl_curl",
+)
+bazel_dep(
+ name = "googleapis",
+ version = "0.0.0-20240326-1c8d509c5",
+ repo_name = "com_google_googleapis",
+)
+bazel_dep(
+ name = "grpc",
+ version = "1.62.1",
+ repo_name = "com_github_grpc_grpc",
+)
+bazel_dep(
+ name = "nlohmann_json",
+ version = "3.11.2",
+ repo_name = "com_github_nlohmann_json",
+)
+bazel_dep(
+ name = "opentelemetry-cpp",
+ version = "1.14.2",
+ repo_name = "io_opentelemetry_cpp",
+)
+bazel_dep(
+ name = "platforms",
+ version = "0.0.9",
+)
+bazel_dep(
+ name = "rules_cc",
+ version = "0.0.9",
+)
+# -- bazel_dep definitions -- #
+
+switched_rules = use_extension("@com_google_googleapis//:extensions.bzl", "switched_rules")
+switched_rules.use_languages(
+ cc = True,
+ grpc = True,
+)
+use_repo(switched_rules, "com_google_googleapis_imports")
16 changes: 16 additions & 0 deletions modules/google-cloud-cpp/2.16.0/presubmit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
matrix:
platform:
- debian10
- ubuntu2004
- macos
- macos_arm64
- windows
bazel:
- 7.x
tasks:
verify_targets:
name: Verify build targets
platform: ${{ platform }}
bazel: ${{ bazel }}
build_targets:
- '@google-cloud-cpp//:opentelemetry'
10 changes: 10 additions & 0 deletions modules/google-cloud-cpp/2.16.0/source.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"url": "https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v2.16.0.tar.gz",
"integrity": "sha256-fKf1g7YNKqEnRBH+07n7OIcRmy6EJEuz/GnqHbgZ5OU=",
"strip_prefix": "google-cloud-cpp-2.16.0",
"patches": {
"google-cloud-cpp.patch": "sha256-N2rycsdlm62VGsJNy1AUrKSpOoocof3JGjBZef28gLI=",
"module_dot_bazel.patch": "sha256-9eqL7nrJZBcCA+20vmMekCP1Fa04GNV1XjO2+Gs5dgs="
},
"patch_strip": 1
}
16 changes: 16 additions & 0 deletions modules/google-cloud-cpp/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"homepage": "https://github.com/googleapis/google-cloud-cpp",
"maintainers": [
{
"email": "[email protected]",
"name": "No Maintainer Specified"
}
],
"repository": [
"github:googleapis/google-cloud-cpp"
],
"versions": [
"2.16.0"
],
"yanked_versions": {}
}

0 comments on commit 8966fb1

Please sign in to comment.