• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2020 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#      https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15package(default_visibility = ["//visibility:public"])
16
17##############################################################################
18# Common
19##############################################################################
20load("@rules_proto//proto:defs.bzl", "proto_library")
21load("@com_google_googleapis_imports//:imports.bzl", "proto_library_with_info")
22
23# TODO(ohren): Change srcs to use an enumeration of each individual proto
24# instead of *.proto globbing once the build file generator supports
25# subpackages.
26proto_library(
27    name = "services_proto",
28    srcs = glob(["*.proto"]),
29    deps = [
30        "//google/ads/googleads/v16/common:common_proto",
31        "//google/ads/googleads/v16/enums:enums_proto",
32        "//google/ads/googleads/v16/errors:errors_proto",
33        "//google/ads/googleads/v16/resources:resources_proto",
34        "//google/api:annotations_proto",
35        "//google/api:client_proto",
36        "//google/api:field_behavior_proto",
37        "//google/api:resource_proto",
38        "//google/longrunning:operations_proto",
39        "//google/rpc:status_proto",
40        "@com_google_protobuf//:empty_proto",
41        "@com_google_protobuf//:field_mask_proto",
42        "@com_google_protobuf//:wrappers_proto",
43    ],
44)
45
46proto_library_with_info(
47    name = "services_proto_with_info",
48    deps = [
49        ":services_proto",
50    ],
51)
52
53##############################################################################
54# Java
55##############################################################################
56load(
57    "@com_google_googleapis_imports//:imports.bzl",
58    "java_grpc_library",
59    "java_proto_library",
60)
61
62java_proto_library(
63    name = "services_java_proto",
64    deps = [":services_proto"],
65)
66
67java_grpc_library(
68    name = "services_java_grpc",
69    srcs = [":services_proto"],
70    deps = [":services_java_proto"],
71)
72
73##############################################################################
74# PHP
75##############################################################################
76
77# PHP targets are in the parent directory's BUILD.bazel file to facilitate
78# aggregating metadata using a single underlying call to protoc.
79
80##############################################################################
81# C#
82##############################################################################
83load(
84    "@com_google_googleapis_imports//:imports.bzl",
85    "csharp_grpc_library",
86    "csharp_proto_library",
87)
88
89csharp_proto_library(
90    name = "services_csharp_proto",
91    deps = [":services_proto"],
92)
93
94csharp_grpc_library(
95    name = "services_csharp_grpc",
96    srcs = [":services_proto"],
97    deps = [":services_csharp_proto"],
98)
99
100##############################################################################
101# Ruby
102##############################################################################
103load(
104    "@com_google_googleapis_imports//:imports.bzl",
105    "ruby_grpc_library",
106    "ruby_proto_library",
107)
108
109ruby_proto_library(
110    name = "services_ruby_proto",
111    deps = [":services_proto"],
112)
113
114ruby_grpc_library(
115    name = "services_ruby_grpc",
116    srcs = [":services_proto"],
117    deps = [":services_ruby_proto"],
118)
119
120##############################################################################
121# Python
122##############################################################################
123load(
124    "@com_google_googleapis_imports//:imports.bzl",
125    "py_grpc_library",
126    "py_proto_library",
127)
128
129py_proto_library(
130    name = "services_py_proto",
131    deps = [":services_proto"],
132)
133
134py_grpc_library(
135    name = "services_py_grpc",
136    srcs = [":services_proto"],
137    deps = [":services_py_proto"],
138)
139