BUILD 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # Copyright 2019 gRPC authors.
  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. # http://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. load("@com_github_grpc_grpc//bazel:objc_grpc_library.bzl", "objc_grpc_library")
  15. load("@build_bazel_rules_apple//apple:ios.bzl", "ios_application")
  16. load("@build_bazel_rules_apple//apple:macos.bzl", "macos_application")
  17. licenses(["notice"])
  18. package(default_visibility = ["//visibility:public"])
  19. objc_grpc_library(
  20. name = "HelloWorld_grpc_proto",
  21. srcs = ["//examples/protos:helloworld.proto"],
  22. tags = ["manual"],
  23. deps = ["//examples/protos:helloworld_proto"],
  24. )
  25. # This one works with import "external/com_github_grpc_grpc/examples/protos/Keyvaluestore.pbrpc.h"
  26. objc_grpc_library(
  27. name = "Keyvaluestore_grpc_proto_external",
  28. srcs = ["//external/com_github_grpc_grpc/examples/protos:keyvaluestore.proto"],
  29. tags = ["manual"],
  30. deps = ["@com_github_grpc_grpc//examples/protos:keyvaluestore_proto"],
  31. )
  32. objc_library(
  33. name = "HelloWorld-lib",
  34. srcs = glob(["helloworld/**/*.m"]),
  35. hdrs = glob(["helloworld/**/*.h"]),
  36. data = glob([
  37. "helloworld/HelloWorld/Base.lproj/**",
  38. "helloworld/HelloWorld/Images.xcassets/**",
  39. ]),
  40. includes = ["helloworld/HelloWorld"],
  41. tags = ["manual"],
  42. deps = [":HelloWorld_grpc_proto"],
  43. )
  44. ios_application(
  45. name = "HelloWorld",
  46. bundle_id = "Google.HelloWorld",
  47. families = [
  48. "iphone",
  49. "ipad",
  50. ],
  51. infoplists = ["helloworld/HelloWorld/Info.plist"],
  52. minimum_os_version = "9.0",
  53. tags = ["manual"],
  54. deps = [":HelloWorld-lib"],
  55. )
  56. objc_library(
  57. name = "HelloWorldMacos-lib",
  58. srcs = glob(["helloworld_macos/**/*.m"]),
  59. hdrs = glob(["helloworld_macos/**/*.h"]),
  60. data = glob([
  61. "helloworld_macos/HelloWorld/Base.lproj/**",
  62. "helloworld_macos/HelloWorld/Images.xcassets/**",
  63. ]),
  64. includes = ["helloworld_macos/HelloWorld"],
  65. tags = ["manual"],
  66. deps = [":HelloWorld_grpc_proto"],
  67. )
  68. macos_application(
  69. name = "HelloWorldMacos",
  70. bundle_id = "io.grpc.HelloWorld",
  71. entitlements = "helloworld_macos/HelloWorld/Helloworld.entitlements",
  72. infoplists = ["helloworld_macos/HelloWorld/Info.plist"],
  73. minimum_os_version = "10.13",
  74. tags = ["manual"],
  75. deps = [":HelloWorldMacos-lib"],
  76. )
  77. objc_grpc_library(
  78. name = "RouteGuide",
  79. srcs = ["//examples/protos:route_guide.proto"],
  80. tags = ["manual"],
  81. deps = ["//examples/protos:route_guide_proto"],
  82. )
  83. objc_library(
  84. name = "RouteGuideClient-lib",
  85. srcs = glob(["route_guide/**/*.m"]),
  86. hdrs = glob(["route_guide/**/*.h"]),
  87. data = glob([
  88. "route_guide/Misc/Base.lproj/**",
  89. "route_guide/Misc/Images.xcassets/**",
  90. ]) + ["route_guide/route_guide_db.json"],
  91. includes = ["route_guide/Misc"],
  92. tags = ["manual"],
  93. deps = [":RouteGuide"],
  94. )
  95. ios_application(
  96. name = "RouteGuideClient",
  97. bundle_id = "gRPC.RouteGuideClient",
  98. families = [
  99. "iphone",
  100. "ipad",
  101. ],
  102. infoplists = ["route_guide/Misc/Info.plist"],
  103. minimum_os_version = "9.0",
  104. tags = ["manual"],
  105. deps = [":RouteGuideClient-lib"],
  106. )