1load("@rules_proto//proto:defs.bzl", "proto_library") 2load("@io_grpc_grpc_java//:java_grpc_library.bzl", "java_grpc_library") 3 4proto_library( 5 name = "helloworld_proto", 6 srcs = ["src/main/proto/helloworld/helloworld.proto"], 7) 8 9java_proto_library( 10 name = "helloworld_java_proto", 11 deps = [":helloworld_proto"], 12) 13 14java_grpc_library( 15 name = "helloworld_java_grpc", 16 srcs = [":helloworld_proto"], 17 deps = [":helloworld_java_proto"], 18) 19 20java_library( 21 name = "example-tls", 22 testonly = 1, 23 srcs = glob( 24 ["src/main/java/**/*.java"], 25 ), 26 runtime_deps = [ 27 "@maven//:io_netty_netty_tcnative_boringssl_static", 28 "@maven//:io_netty_netty_tcnative_classes", 29 ], 30 deps = [ 31 ":helloworld_java_grpc", 32 ":helloworld_java_proto", 33 "@io_grpc_grpc_java//api", 34 "@io_grpc_grpc_java//netty", 35 "@io_grpc_grpc_java//protobuf", 36 "@io_grpc_grpc_java//stub", 37 "@maven//:io_netty_netty_handler", 38 ], 39) 40 41java_binary( 42 name = "hello-world-tls-client", 43 testonly = 1, 44 main_class = "io.grpc.examples.helloworldtls.HelloWorldClientTls", 45 runtime_deps = [ 46 ":example-tls", 47 ], 48) 49 50java_binary( 51 name = "hello-world-tls-server", 52 testonly = 1, 53 main_class = "io.grpc.examples.helloworldtls.HelloWorldServerTls", 54 runtime_deps = [ 55 ":example-tls", 56 ], 57) 58