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") 21 22# TODO(ohren): Change srcs to use an enumeration of each individual proto 23# instead of *.proto globbing once the build file generator supports subpackages. 24proto_library( 25 name = "enums_proto", 26 srcs = glob(["*.proto"]), 27 deps = [ 28 "//google/api:annotations_proto", 29 ], 30) 31 32############################################################################## 33# Java 34############################################################################## 35load( 36 "@com_google_googleapis_imports//:imports.bzl", 37 "java_proto_library", 38) 39 40java_proto_library( 41 name = "enums_java_proto", 42 deps = [":enums_proto"], 43) 44 45############################################################################## 46# PHP 47############################################################################## 48 49# PHP targets are in the parent directory's BUILD.bazel file to facilitate 50# aggregating metadata using a single underlying call to protoc. 51 52############################################################################## 53# C# 54############################################################################## 55load( 56 "@com_google_googleapis_imports//:imports.bzl", 57 "csharp_proto_library", 58) 59 60csharp_proto_library( 61 name = "enums_csharp_proto", 62 deps = [":enums_proto"], 63) 64 65############################################################################## 66# Ruby 67############################################################################## 68load( 69 "@com_google_googleapis_imports//:imports.bzl", 70 "ruby_proto_library", 71) 72 73ruby_proto_library( 74 name = "enums_ruby_proto", 75 deps = [":enums_proto"], 76) 77 78############################################################################## 79# Python 80############################################################################## 81load( 82 "@com_google_googleapis_imports//:imports.bzl", 83 "py_proto_library", 84) 85 86py_proto_library( 87 name = "enums_py_proto", 88 deps = [":enums_proto"], 89) 90