github.com/emcfarlane/larking@v0.0.0-20220605172417-1704b45ee6c3/examples/proto/BUILD.bazel (about)

     1  #load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_proto_library")
     2  load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")
     3  load("@rules_proto//proto:defs.bzl", "proto_library")
     4  load("@com_github_grpc_grpc//bazel:cc_grpc_library.bzl", "cc_grpc_library")
     5  load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library")
     6  
     7  proto_library(
     8      name = "helloworld_proto",
     9      srcs = ["helloworld.proto"],
    10      deps = ["@googleapis//google/api:annotations_proto"],
    11  )
    12  
    13  cc_proto_library(
    14      name = "helloworld_cc_proto",
    15      visibility = ["//visibility:public"],
    16      deps = [":helloworld_proto"],
    17  )
    18  
    19  cc_grpc_library(
    20      name = "helloworld_cc_grpc",
    21      srcs = [":helloworld_proto"],
    22      grpc_only = True,
    23      visibility = ["//visibility:public"],
    24      deps = [":helloworld_cc_proto"],
    25  )
    26  
    27  java_proto_library(
    28      name = "helloworld_java_proto",
    29      visibility = ["//visibility:public"],
    30      deps = [":helloworld_proto"],
    31  )
    32  
    33  java_grpc_library(
    34      name = "helloworld_java_grpc",
    35      srcs = [":helloworld_proto"],
    36      visibility = ["//visibility:public"],
    37      deps = [":helloworld_java_proto"],
    38  )
    39  
    40  proto_library(
    41      name = "hellostream_proto",
    42      srcs = ["hellostream.proto"],
    43      deps = ["@googleapis//google/api:annotations_proto"],
    44  )
    45  
    46  cc_proto_library(
    47      name = "hellostream_cc_proto",
    48      visibility = ["//visibility:public"],
    49      deps = [":hellostream_proto"],
    50  )
    51  
    52  cc_grpc_library(
    53      name = "hellostream_cc_grpc",
    54      srcs = [":hellostream_proto"],
    55      grpc_only = True,
    56      visibility = ["//visibility:public"],
    57      deps = [":hellostream_cc_proto"],
    58  )
    59  
    60  java_proto_library(
    61      name = "hello_streaming_java_proto",
    62      visibility = ["//visibility:public"],
    63      deps = [":hello_streaming_proto"],
    64  )
    65  
    66  java_grpc_library(
    67      name = "hello_streaming_java_grpc",
    68      srcs = [":hello_streaming_proto"],
    69      visibility = ["//visibility:public"],
    70      deps = [":hello_streaming_java_proto"],
    71  )
    72  
    73  go_proto_library(
    74      name = "annotations_go_proto",
    75      importpath = "",
    76      protos = ["@googleapis//google/api:annotations_proto"],
    77  )
    78  
    79  go_proto_library(
    80      name = "helloworld_go_proto",
    81      compilers = ["@io_bazel_rules_go//proto:go_grpc"],
    82      importpath = "github.com/emcfarlane/larking/examples/proto/helloworld",
    83      protos = [
    84          #":hellostream_proto",
    85          ":helloworld_proto",
    86      ],
    87      visibility = ["//visibility:public"],
    88      deps = [
    89          "@go_googleapis//google/api:annotations_go_proto",
    90          "@go_googleapis//google/api:httpbody_go_proto",
    91          "@org_golang_google_grpc//:go_default_library",
    92          "@org_golang_google_grpc//codes:go_default_library",
    93          #"@org_golang_google_grpc//status:go_default_library",
    94          "@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
    95          "@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
    96      ],
    97  )
    98  
    99  # TODO: https://github.com/bazelbuild/rules_go/pull/2740
   100  #go_library(
   101  #    name = "go_default_library",
   102  #    srcs = [
   103  #        "hellostream.pb.go",
   104  #        "hellostream_grpc.pb.go",
   105  #        "helloworld.pb.go",
   106  #        "helloworld_grpc.pb.go",
   107  #    ],
   108  #    importpath = "github.com/emcfarlane/larking/examples/proto",
   109  #    visibility = ["//visibility:public"],
   110  #    deps = [
   111  #        "@com_github_golang_protobuf//proto:go_default_library",
   112  #        "@go_googleapis//google/api:annotations_go_proto",
   113  #        "@org_golang_google_grpc//:go_default_library",
   114  #        "@org_golang_google_grpc//codes:go_default_library",
   115  #        "@org_golang_google_grpc//status:go_default_library",
   116  #        "@org_golang_google_protobuf//reflect/protoreflect:go_default_library",
   117  #        "@org_golang_google_protobuf//runtime/protoimpl:go_default_library",
   118  #    ],
   119  #)