Package.swift 3.1 KB

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