Skip to content

Commit

Permalink
Add bazel targets for test protos (#513)
Browse files Browse the repository at this point in the history
So they can be referenced by other repos that use bazel.
  • Loading branch information
Alfus authored Aug 3, 2023
1 parent 9ef2646 commit 44b1d1d
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
15 changes: 15 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
# Copyright 2022 Buf Technologies, Inc.
#
# 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
#
# http://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.

workspace(name = "com_github_bufbuild_protovalidate")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "com_github_grpc_grpc",
sha256 = "931f07db9d48cff6a6007c1033ba6d691fe655bea2765444bc1ad974dfc840aa",
strip_prefix = "grpc-1.56.2",
urls = [
"https://github.com/grpc/grpc/archive/v1.56.2.tar.gz",
Expand Down
14 changes: 14 additions & 0 deletions cc/grpc_client_test.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
// Copyright 2022 Buf Technologies, Inc.
//
// 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
//
// http://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.

#include <memory>
#include <string>

Expand Down
43 changes: 43 additions & 0 deletions proto/connectrpc/conformance/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Copyright 2022 Buf Technologies, Inc.
#
# 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
#
# http://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.

proto_library(
name = "messages",
srcs = ["messages.proto"],
strip_import_prefix = "/proto",
deps = [
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:wrappers_proto",
],
)

proto_library(
name = "test",
srcs = ["test.proto"],
strip_import_prefix = "/proto",
deps = [
":messages",
"@com_google_protobuf//:empty_proto",
],
)

cc_proto_library(
name = "messages_cc_proto",
deps = [":messages"],
)

cc_proto_library(
name = "test_cc_proto",
deps = [":test"],
)

0 comments on commit 44b1d1d

Please sign in to comment.