Package.swift 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // swift-tools-version:4.0
  2. /*
  3. * Copyright 2017, gRPC Authors All rights reserved.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. import PackageDescription
  18. var dependencies: [Package.Dependency] = [
  19. .package(url: "https://github.com/apple/swift-protobuf.git", from: "1.0.2"),
  20. .package(url: "https://github.com/kylef/Commander.git", from: "0.8.0")
  21. ]
  22. #if !os(macOS)
  23. dependencies.insert(.package(url: "https://github.com/apple/swift-nio-zlib-support.git", from: "1.0.0"), at: 0)
  24. #endif
  25. let package = Package(
  26. name: "SwiftGRPC",
  27. products: [
  28. .library(name: "SwiftGRPC", targets: ["SwiftGRPC"]),
  29. ],
  30. dependencies: dependencies,
  31. targets: [
  32. .target(name: "SwiftGRPC",
  33. dependencies: ["CgRPC", "SwiftProtobuf"]),
  34. .target(name: "CgRPC",
  35. dependencies: ["BoringSSL"]),
  36. .target(name: "RootsEncoder"),
  37. .target(name: "protoc-gen-swiftgrpc",
  38. dependencies: [
  39. "SwiftProtobuf",
  40. "SwiftProtobufPluginLibrary",
  41. "protoc-gen-swift"]),
  42. .target(name: "BoringSSL"),
  43. .target(name: "Echo",
  44. dependencies: [
  45. "SwiftGRPC",
  46. "SwiftProtobuf",
  47. "Commander"],
  48. path: "Sources/Examples/Echo"),
  49. .target(name: "Simple",
  50. dependencies: ["SwiftGRPC", "Commander"],
  51. path: "Sources/Examples/Simple"),
  52. .testTarget(name: "SwiftGRPCTests", dependencies: ["SwiftGRPC"])
  53. ])