Package.swift 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // swift-tools-version:5.3
  2. // The swift-tools-version declares the minimum version of Swift required to build this package.
  3. // Copyright 2021 Google LLC
  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. import PackageDescription
  17. let googleSignInVersion = "6.0.0"
  18. let package = Package(
  19. name: "GoogleSignIn",
  20. defaultLocalization: "en",
  21. platforms: [.iOS(.v9)],
  22. products: [
  23. .library(
  24. name: "GoogleSignIn",
  25. targets: ["GoogleSignIn"]
  26. ),
  27. ],
  28. dependencies: [
  29. .package(
  30. name: "AppAuth",
  31. url: "https://github.com/openid/AppAuth-iOS.git",
  32. "1.4.0" ..< "2.0.0"),
  33. .package(
  34. name: "GTMAppAuth",
  35. url: "https://github.com/google/GTMAppAuth.git",
  36. "1.2.0" ..< "2.0.0"),
  37. .package(
  38. name: "GTMSessionFetcher",
  39. url: "https://github.com/google/gtm-session-fetcher.git",
  40. "1.5.0" ..< "2.0.0"),
  41. .package(
  42. name: "OCMock",
  43. url: "https://github.com/firebase/ocmock.git",
  44. .revision("7291762d3551c5c7e31c49cce40a0e391a52e889")),
  45. .package(
  46. name: "GoogleUtilities",
  47. url: "https://github.com/google/GoogleUtilities.git",
  48. "7.3.0" ..< "8.0.0"),
  49. ],
  50. targets: [
  51. .target(
  52. name: "GoogleSignIn",
  53. dependencies: [
  54. .product(name: "AppAuth", package: "AppAuth"),
  55. .product(name: "GTMAppAuth", package: "GTMAppAuth"),
  56. .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher"),
  57. ],
  58. path: "GoogleSignIn/Sources",
  59. resources: [
  60. .process("Resources"),
  61. .process("Strings"),
  62. ],
  63. publicHeadersPath: "Public",
  64. cSettings: [
  65. .headerSearchPath("../../"),
  66. .define("GID_SDK_VERSION", to: googleSignInVersion),
  67. ],
  68. linkerSettings: [
  69. .linkedFramework("CoreGraphics"),
  70. .linkedFramework("CoreText"),
  71. .linkedFramework("Foundation"),
  72. .linkedFramework("LocalAuthentication"),
  73. .linkedFramework("Security"),
  74. .linkedFramework("UIKit"),
  75. ]
  76. ),
  77. .testTarget(
  78. name: "GoogleSignIn-UnitTests",
  79. dependencies: [
  80. "GoogleSignIn",
  81. "OCMock",
  82. .product(name: "AppAuth", package: "AppAuth"),
  83. .product(name: "GTMAppAuth", package: "GTMAppAuth"),
  84. .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher"),
  85. .product(name: "GULMethodSwizzler", package: "GoogleUtilities"),
  86. .product(name: "GULSwizzlerTestHelpers", package: "GoogleUtilities"),
  87. ],
  88. path: "GoogleSignIn/Tests/Unit",
  89. cSettings: [
  90. .headerSearchPath("../../../"),
  91. .define("GID_SDK_VERSION", to: googleSignInVersion),
  92. ]
  93. ),
  94. ]
  95. )