chore: add gapic build rules

PiperOrigin-RevId: 363699248
pull/644/head
Google APIs 4 years ago committed by Copybara-Service
parent f321fd2a1c
commit cd26fbc116
  1. 188
      google/cloud/apigateway/v1/BUILD.bazel
  2. 6
      google/cloud/apigateway/v1/apigateway_gapic.yaml

@ -1,4 +1,13 @@
# This file was automatically generated by BuildFileGenerator
# https://github.com/googleapis/rules_gapic/tree/master/bazel
# Most of the manual changes to this file will be overwritten.
# It's **only** allowed to change the following rule attribute values:
# - names of *_gapic_assembly_* rules
# - certain parameters of *_gapic_library rules, including but not limited to:
# * extra_protoc_parameters
# * extra_protoc_file_parameters
# The complete list of preserved parameters can be found in the source code.
# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])
@ -39,6 +48,9 @@ proto_library_with_info(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"java_gapic_assembly_gradle_pkg",
"java_gapic_library",
"java_gapic_test",
"java_grpc_library",
"java_proto_library",
)
@ -54,12 +66,46 @@ java_grpc_library(
deps = [":apigateway_java_proto"],
)
java_gapic_library(
name = "apigateway_java_gapic",
srcs = [":apigateway_proto_with_info"],
grpc_service_config = "apigateway_grpc_service_config.json",
test_deps = [
":apigateway_java_grpc",
],
deps = [
":apigateway_java_proto",
],
)
java_gapic_test(
name = "apigateway_java_gapic_test_suite",
test_classes = [
"com.google.cloud.apigateway.v1.ApiGatewayServiceClientTest",
],
runtime_deps = [":apigateway_java_gapic_test"],
)
# Open Source Packages
java_gapic_assembly_gradle_pkg(
name = "google-cloud-apigateway-v1-java",
deps = [
":apigateway_java_gapic",
":apigateway_java_grpc",
":apigateway_java_proto",
":apigateway_proto",
],
)
##############################################################################
# Go
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"go_gapic_assembly_pkg",
"go_gapic_library",
"go_proto_library",
"go_test",
)
go_proto_library(
@ -73,40 +119,60 @@ go_proto_library(
],
)
go_gapic_library(
name = "apigateway_go_gapic",
srcs = [":apigateway_proto_with_info"],
grpc_service_config = "apigateway_grpc_service_config.json",
importpath = "cloud.google.com/go/apigateway/apiv1;apigateway",
metadata = True,
service_yaml = "apigateway_v1.yaml",
deps = [
":apigateway_go_proto",
"//google/longrunning:longrunning_go_proto",
"@com_google_cloud_go//longrunning:go_default_library",
"@com_google_cloud_go//longrunning/autogen:go_default_library",
],
)
go_test(
name = "apigateway_go_gapic_test",
srcs = [":apigateway_go_gapic_srcjar_test"],
embed = [":apigateway_go_gapic"],
importpath = "cloud.google.com/go/apigateway/apiv1",
)
# Open Source Packages
go_gapic_assembly_pkg(
name = "gapi-cloud-apigateway-v1-go",
deps = [
":apigateway_go_gapic",
":apigateway_go_gapic_srcjar-metadata.srcjar",
":apigateway_go_gapic_srcjar-test.srcjar",
":apigateway_go_proto",
],
)
##############################################################################
# Python
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"moved_proto_library",
"py_grpc_library",
"py_proto_library",
"py_gapic_assembly_pkg",
"py_gapic_library",
)
moved_proto_library(
name = "apigateway_moved_proto",
py_gapic_library(
name = "apigateway_py_gapic",
srcs = [":apigateway_proto"],
deps = [
"//google/api:annotations_proto",
"//google/api:client_proto",
"//google/api:field_behavior_proto",
"//google/api:resource_proto",
"//google/longrunning:operations_proto",
"@com_google_protobuf//:field_mask_proto",
"@com_google_protobuf//:timestamp_proto",
],
)
py_proto_library(
name = "apigateway_py_proto",
plugin = "@protoc_docs_plugin//:docs_plugin",
deps = [":apigateway_moved_proto"],
grpc_service_config = "apigateway_grpc_service_config.json",
)
py_grpc_library(
name = "apigateway_py_grpc",
srcs = [":apigateway_moved_proto"],
deps = [":apigateway_py_proto"],
# Open Source Packages
py_gapic_assembly_pkg(
name = "apigateway-v1-py",
deps = [
":apigateway_py_gapic",
],
)
##############################################################################
@ -114,6 +180,8 @@ py_grpc_library(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"php_gapic_assembly_pkg",
"php_gapic_library",
"php_grpc_library",
"php_proto_library",
)
@ -129,6 +197,29 @@ php_grpc_library(
deps = [":apigateway_php_proto"],
)
php_gapic_library(
name = "apigateway_php_gapic",
src = ":apigateway_proto_with_info",
gapic_yaml = "apigateway_gapic.yaml",
grpc_service_config = "apigateway_grpc_service_config.json",
package = "google.cloud.apigateway.v1",
service_yaml = "apigateway_v1.yaml",
deps = [
":apigateway_php_grpc",
":apigateway_php_proto",
],
)
# Open Source Packages
php_gapic_assembly_pkg(
name = "google-cloud-apigateway-v1-php",
deps = [
":apigateway_php_gapic",
":apigateway_php_grpc",
":apigateway_php_proto",
],
)
##############################################################################
# Node.js
##############################################################################
@ -142,6 +233,7 @@ nodejs_gapic_library(
name = "apigateway_nodejs_gapic",
package_name = "@google-cloud/api-gateway",
src = ":apigateway_proto_with_info",
extra_protoc_parameters = ["metadata"],
grpc_service_config = "apigateway_grpc_service_config.json",
package = "google.cloud.apigateway.v1",
service_yaml = "apigateway_v1.yaml",
@ -161,6 +253,8 @@ nodejs_gapic_assembly_pkg(
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"ruby_cloud_gapic_library",
"ruby_gapic_assembly_pkg",
"ruby_grpc_library",
"ruby_proto_library",
)
@ -176,11 +270,34 @@ ruby_grpc_library(
deps = [":apigateway_ruby_proto"],
)
ruby_cloud_gapic_library(
name = "apigateway_ruby_gapic",
srcs = [":apigateway_proto_with_info"],
extra_protoc_parameters = ["ruby-cloud-gem-name=google-cloud-apigateway-v1"],
grpc_service_config = "apigateway_grpc_service_config.json",
deps = [
":apigateway_ruby_grpc",
":apigateway_ruby_proto",
],
)
# Open Source Packages
ruby_gapic_assembly_pkg(
name = "google-cloud-apigateway-v1-ruby",
deps = [
":apigateway_ruby_gapic",
":apigateway_ruby_grpc",
":apigateway_ruby_proto",
],
)
##############################################################################
# C#
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"csharp_gapic_assembly_pkg",
"csharp_gapic_library",
"csharp_grpc_library",
"csharp_proto_library",
)
@ -196,7 +313,28 @@ csharp_grpc_library(
deps = [":apigateway_csharp_proto"],
)
csharp_gapic_library(
name = "apigateway_csharp_gapic",
srcs = [":apigateway_proto_with_info"],
common_resources_config = "@gax_dotnet//:Google.Api.Gax/ResourceNames/CommonResourcesConfig.json",
grpc_service_config = "apigateway_grpc_service_config.json",
deps = [
":apigateway_csharp_grpc",
":apigateway_csharp_proto",
],
)
# Open Source Packages
csharp_gapic_assembly_pkg(
name = "google-cloud-apigateway-v1-csharp",
deps = [
":apigateway_csharp_gapic",
":apigateway_csharp_grpc",
":apigateway_csharp_proto",
],
)
##############################################################################
# C++
##############################################################################
# Put your C++ code here
# Put your C++ rules here

@ -0,0 +1,6 @@
type: com.google.api.codegen.ConfigProto
config_schema_version: 2.0.0
# The settings of generated code in a specific language.
language_settings:
java:
package_name: com.google.cloud.apigateway.v1
Loading…
Cancel
Save