github.com/grpc-ecosystem/grpc-gateway/v2@v2.19.1/BUILD.bazel (about)

     1  load("@bazel_gazelle//:def.bzl", "gazelle")
     2  load("@com_github_bazelbuild_buildtools//buildifier:def.bzl", "buildifier")
     3  load("@io_bazel_rules_go//proto:compiler.bzl", "go_proto_compiler")
     4  load("@io_bazel_rules_go//proto/wkt:well_known_types.bzl", "PROTO_RUNTIME_DEPS", "WELL_KNOWN_TYPES_APIV2")
     5  
     6  exports_files(["LICENSE"])
     7  
     8  buildifier(
     9      name = "buildifier",
    10  )
    11  
    12  buildifier(
    13      name = "buildifier_check",
    14      mode = "check",
    15  )
    16  
    17  # gazelle:exclude _output
    18  # gazelle:prefix github.com/grpc-ecosystem/grpc-gateway/v2
    19  # gazelle:go_proto_compilers //:go_apiv2
    20  # gazelle:go_grpc_compilers //:go_apiv2, //:go_grpc
    21  # gazelle:go_naming_convention import_alias
    22  # gazelle:resolve proto proto google/api/annotations.proto @googleapis//google/api:annotations_proto
    23  # gazelle:resolve proto go google/api/annotations.proto  @org_golang_google_genproto_googleapis_api//annotations
    24  # gazelle:resolve proto proto google/api/http.proto @googleapis//google/api:http_proto
    25  # gazelle:resolve proto go google/api/http.proto  @org_golang_google_genproto_googleapis_api//annotations
    26  # gazelle:resolve proto proto google/api/field_behavior.proto @googleapis//google/api:field_behavior_proto
    27  # gazelle:resolve proto go google/api/field_behavior.proto  @org_golang_google_genproto_googleapis_api//annotations
    28  # gazelle:resolve proto proto google/api/httpbody.proto @googleapis//google/api:httpbody_proto
    29  # gazelle:resolve proto go google/api/httpbody.proto  @org_golang_google_genproto_googleapis_api//httpbody
    30  # gazelle:resolve proto proto google/api/visibility.proto @googleapis//google/api:visibility_proto
    31  # gazelle:resolve proto go google/api/visibility.proto  @org_golang_google_genproto_googleapis_api//visibility
    32  # gazelle:resolve proto proto google/rpc/status.proto @googleapis//google/rpc:status_proto
    33  # gazelle:resolve proto go google/rpc/status.proto  @org_golang_google_genproto_googleapis_rpc//status
    34  
    35  gazelle(name = "gazelle")
    36  
    37  package_group(
    38      name = "generators",
    39      packages = [
    40          "//protoc-gen-grpc-gateway/...",
    41          "//protoc-gen-openapiv2/...",
    42      ],
    43  )
    44  
    45  go_proto_compiler(
    46      name = "go_apiv2",
    47      options = [
    48          "paths=source_relative",
    49      ],
    50      plugin = "@org_golang_google_protobuf//cmd/protoc-gen-go",
    51      suffix = ".pb.go",
    52      visibility = ["//visibility:public"],
    53      deps = PROTO_RUNTIME_DEPS + WELL_KNOWN_TYPES_APIV2,
    54  )
    55  
    56  go_proto_compiler(
    57      name = "go_grpc",
    58      options = [
    59          "paths=source_relative",
    60          "require_unimplemented_servers=false",
    61      ],
    62      plugin = "@org_golang_google_grpc_cmd_protoc_gen_go_grpc//:protoc-gen-go-grpc",
    63      suffix = "_grpc.pb.go",
    64      visibility = ["//visibility:public"],
    65      deps = PROTO_RUNTIME_DEPS + [
    66          "@org_golang_google_grpc//:go_default_library",
    67          "@org_golang_google_grpc//codes:go_default_library",
    68          "@org_golang_google_grpc//status:go_default_library",
    69      ],
    70  )