Package.swift 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766
  1. // swift-tools-version:5.3
  2. // The swift-tools-version declares the minimum version of Swift required to build this package.
  3. // Copyright 2020 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. // This Package.swift is a Work in Progress. We intend to keep it functional
  17. // on the master branch, but it is rapidly evolving and may have occasional
  18. // breakages. Please report any issues at
  19. // https://github.com/firebase/firebase-ios-sdk/issues/new/choose.
  20. import PackageDescription
  21. let package = Package(
  22. name: "Firebase",
  23. platforms: [.iOS(.v9), .macOS(.v10_11), .tvOS(.v10)],
  24. products: [
  25. .library(
  26. name: "Firebase",
  27. targets: ["Firebase"]
  28. ),
  29. .library(
  30. name: "FirebaseCore",
  31. targets: ["FirebaseCore"]
  32. ),
  33. .library(
  34. name: "FirebaseAnalytics",
  35. targets: ["FirebaseAnalyticsWrapper"]
  36. ),
  37. .library(
  38. name: "FirebaseAuth",
  39. targets: ["FirebaseAuth"]
  40. ),
  41. .library(
  42. name: "FirebaseCrashlytics",
  43. targets: ["FirebaseCrashlytics"]
  44. ),
  45. .library(
  46. name: "FirebaseDatabase",
  47. targets: ["FirebaseDatabase"]
  48. ),
  49. .library(
  50. name: "FirebaseDynamicLinks",
  51. targets: ["FirebaseDynamicLinks"]
  52. ),
  53. .library(
  54. name: "FirebaseFirestore",
  55. targets: ["FirebaseFirestore"]
  56. ),
  57. .library(
  58. name: "FirebaseFirestoreSwift",
  59. targets: ["FirebaseFirestoreSwift"]
  60. ),
  61. .library(
  62. name: "FirebaseFunctions",
  63. targets: ["FirebaseFunctions"]
  64. ),
  65. .library(
  66. name: "FirebaseInAppMessaging",
  67. targets: ["FirebaseInAppMessaging"]
  68. ),
  69. .library(
  70. name: "FirebaseInstallations",
  71. targets: ["FirebaseInstallations"]
  72. ),
  73. // .library(
  74. // name: "FirebaseInstanceID",
  75. // targets: ["FirebaseInstanceID"]
  76. // ),
  77. .library(
  78. name: "FirebaseRemoteConfig",
  79. targets: ["FirebaseRemoteConfig"]
  80. ),
  81. .library(
  82. name: "FirebaseStorage",
  83. targets: ["FirebaseStorage"]
  84. ),
  85. .library(
  86. name: "FirebaseStorageSwift",
  87. targets: ["FirebaseStorageSwift"]
  88. ),
  89. // Not intended for public consumption, but needed for FirebaseUI.
  90. .library(
  91. name: "GoogleUtilities_UserDefaults",
  92. targets: ["GoogleUtilities_UserDefaults"]
  93. ),
  94. ],
  95. dependencies: [
  96. .package(name: "Promises", url: "https://github.com/google/promises.git", "1.2.8" ..< "1.3.0"),
  97. .package(
  98. name: "GTMSessionFetcher",
  99. url: "https://github.com/google/gtm-session-fetcher.git",
  100. "1.4.0" ..< "2.0.0"
  101. ),
  102. .package(
  103. name: "nanopb",
  104. url: "https://github.com/nanopb/nanopb.git",
  105. // This revision adds SPM enablement to the 0.3.9.6 release tag.
  106. .revision("3cfa21200eea012d8765239ad4c50d8a36c283f1")
  107. ),
  108. .package(
  109. name: "abseil",
  110. url: "https://github.com/paulb777/abseil-cpp.git",
  111. .revision("7790dc1")
  112. ),
  113. .package(name: "gRPC", url: "https://github.com/paulb777/grpc.git", .revision("37a9e06cd8")),
  114. .package(name: "OCMock", url: "https://github.com/paulb777/ocmock.git", .revision("7291762")),
  115. .package(name: "leveldb", url: "https://github.com/paulb777/leveldb.git", .revision("3f04697")),
  116. // Branches need a force update with a run with the revision set like below.
  117. // .package(url: "https://github.com/paulb777/nanopb.git", .revision("564392bd87bd093c308a3aaed3997466efb95f74"))
  118. ],
  119. targets: [
  120. .target(
  121. name: "Firebase",
  122. path: "CoreOnly/Sources",
  123. publicHeadersPath: "./"
  124. ),
  125. .target(
  126. name: "FirebaseCore",
  127. dependencies: [
  128. "FirebaseCoreDiagnostics",
  129. "GoogleUtilities_Environment",
  130. "GoogleUtilities_Logger",
  131. ],
  132. path: "FirebaseCore/Sources",
  133. publicHeadersPath: "Public",
  134. cSettings: [
  135. .headerSearchPath("../.."),
  136. .define("FIRCore_VERSION", to: "0.0.1"), // TODO: Fix version
  137. .define("Firebase_VERSION", to: "0.0.1"), // TODO: Fix version
  138. // TODO: - Add support for cflags cSetting so that we can set the -fno-autolink option
  139. ]
  140. ),
  141. .testTarget(
  142. name: "CoreUnit",
  143. dependencies: ["FirebaseCore", "OCMock"],
  144. path: "FirebaseCore/Tests/Unit",
  145. exclude: ["Resources/GoogleService-Info.plist"],
  146. cSettings: [
  147. .headerSearchPath("../../.."),
  148. ]
  149. ),
  150. .target(
  151. name: "FirebaseCoreDiagnostics",
  152. dependencies: [
  153. "GoogleDataTransport",
  154. "GoogleUtilities_Environment",
  155. "GoogleUtilities_Logger",
  156. .product(name: "nanopb", package: "nanopb"),
  157. ],
  158. path: "Firebase/CoreDiagnostics/FIRCDLibrary",
  159. publicHeadersPath: ".",
  160. cSettings: [
  161. .headerSearchPath("../../.."),
  162. .define("PB_FIELD_32BIT", to: "1"),
  163. .define("PB_NO_PACKED_STRUCTS", to: "1"),
  164. .define("PB_ENABLE_MALLOC", to: "1"),
  165. ]
  166. ),
  167. .target(
  168. name: "FirebaseABTesting",
  169. dependencies: ["FirebaseCore"],
  170. path: "FirebaseABTesting/Sources",
  171. publicHeadersPath: "Public",
  172. cSettings: [
  173. .headerSearchPath("../../"),
  174. .define("FIRABTesting_VERSION", to: "0.0.1"), // TODO: Fix version
  175. ]
  176. ),
  177. .testTarget(
  178. name: "ABTestingUnit",
  179. dependencies: ["FirebaseABTesting", "OCMock"],
  180. path: "FirebaseABTesting/Tests/Unit",
  181. resources: [.process("Resources")],
  182. cSettings: [
  183. .headerSearchPath("../../.."),
  184. ]
  185. ),
  186. .target(
  187. name: "FirebaseAnalyticsWrapper",
  188. dependencies: [
  189. "FirebaseAnalytics",
  190. "FIRAnalyticsConnector",
  191. "GoogleAppMeasurement",
  192. "FirebaseCore",
  193. "FirebaseInstallations",
  194. "GoogleUtilities_AppDelegateSwizzler",
  195. "GoogleUtilities_MethodSwizzler",
  196. "GoogleUtilities_NSData",
  197. "GoogleUtilities_Network",
  198. .product(name: "nanopb", package: "nanopb"),
  199. ],
  200. path: "FirebaseAnalyticsWrapper",
  201. publicHeadersPath: "Public",
  202. linkerSettings: [
  203. .linkedLibrary("sqlite3"),
  204. .linkedLibrary("c++"),
  205. .linkedLibrary("z"),
  206. .linkedFramework("StoreKit"),
  207. ]
  208. ),
  209. .binaryTarget(
  210. name: "FirebaseAnalytics",
  211. url: "https://dl.google.com/firebase/ios/swiftpm/6.30.0/FirebaseAnalytics.zip",
  212. checksum: "47c403aeac1ad35dc6dccb3e57256d5ca65863970ebe3ea8407e4220c9f16ea7"
  213. ),
  214. .binaryTarget(
  215. name: "FIRAnalyticsConnector",
  216. url: "https://dl.google.com/firebase/ios/swiftpm/6.30.0/FIRAnalyticsConnector.zip",
  217. checksum: "b809e8c352ea2e7788d4ee1c6e191de2666582ec616572ea2568420b2d524532"
  218. ),
  219. .binaryTarget(
  220. name: "GoogleAppMeasurement",
  221. url: "https://dl.google.com/firebase/ios/swiftpm/6.30.0/GoogleAppMeasurement.zip",
  222. checksum: "1cbd0f708981e3bcb7b84399a635c469c9e994bf38266d3e4f1e0caae54eda72"
  223. ),
  224. .target(
  225. name: "FirebaseAuth",
  226. dependencies: ["FirebaseCore",
  227. "GoogleUtilities_Environment",
  228. "GoogleUtilities_AppDelegateSwizzler",
  229. .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher")],
  230. path: "FirebaseAuth/Sources",
  231. publicHeadersPath: "Public",
  232. cSettings: [
  233. .headerSearchPath("../../"),
  234. .define("FIRAuth_VERSION", to: "0.0.1"), // TODO: Fix version
  235. .define("FIRAuth_MINOR_VERSION", to: "1.1"), // TODO: Fix version
  236. ]
  237. ),
  238. .testTarget(
  239. name: "AuthUnit",
  240. dependencies: ["FirebaseAuth", "OCMock"],
  241. path: "FirebaseAuth/Tests/Unit",
  242. exclude: [
  243. "FIRAuthKeychainServicesTests.m", // TODO: figure out SPM keychain testing
  244. "FIRAuthTests.m",
  245. "FIRUserTests.m",
  246. ],
  247. cSettings: [
  248. .headerSearchPath("../../.."),
  249. ]
  250. ),
  251. .target(
  252. name: "FirebaseCrashlytics",
  253. dependencies: ["FirebaseCore", "FirebaseInstallations", "GoogleDataTransport",
  254. .product(name: "FBLPromises", package: "Promises"),
  255. .product(name: "nanopb", package: "nanopb")],
  256. path: "Crashlytics",
  257. exclude: [
  258. "run",
  259. "CHANGELOG.md",
  260. "LICENSE",
  261. "README.md",
  262. "Data/",
  263. "Protos/",
  264. "ProtoSupport/",
  265. "UnitTests/",
  266. "generate_project.sh",
  267. "upload-symbols",
  268. "third_party/libunwind/LICENSE",
  269. ],
  270. sources: [
  271. "Crashlytics/",
  272. "Protogen/",
  273. "Shared/",
  274. "third_party/libunwind/dwarf.h",
  275. ],
  276. publicHeadersPath: "Crashlytics/Public",
  277. cSettings: [
  278. .headerSearchPath(".."),
  279. .define("DISPLAY_VERSION", to: "0.0.1"), // TODO: Fix version
  280. .define("CLS_SDK_NAME", to: "Crashlytics iOS SDK", .when(platforms: .some([.iOS]))),
  281. .define("CLS_SDK_NAME", to: "Crashlytics macOS SDK", .when(platforms: .some([.macOS]))),
  282. .define("CLS_SDK_NAME", to: "Crashlytics tvOS SDK", .when(platforms: .some([.tvOS]))),
  283. .define("PB_FIELD_32BIT", to: "1"),
  284. .define("PB_NO_PACKED_STRUCTS", to: "1"),
  285. .define("PB_ENABLE_MALLOC", to: "1"),
  286. ]
  287. ),
  288. .target(
  289. name: "FirebaseDatabase",
  290. dependencies: [
  291. "FirebaseCore",
  292. "leveldb",
  293. ],
  294. path: "FirebaseDatabase/Sources",
  295. exclude: [
  296. "third_party/Wrap-leveldb/LICENSE",
  297. "third_party/SocketRocket/LICENSE",
  298. "third_party/FImmutableSortedDictionary/LICENSE",
  299. "third_party/SocketRocket/aa2297808c225710e267afece4439c256f6efdb3",
  300. ],
  301. publicHeadersPath: "Public",
  302. cSettings: [
  303. .headerSearchPath("../../"),
  304. .define("FIRDatabase_VERSION", to: "0.0.1"), // TODO: Fix version
  305. ]
  306. ),
  307. .testTarget(
  308. name: "DatabaseUnit",
  309. dependencies: ["FirebaseDatabase", "OCMock", "SharedTestUtilities"],
  310. path: "FirebaseDatabase/Tests/",
  311. exclude: [
  312. "Integration/",
  313. ],
  314. resources: [.process("Resources")],
  315. cSettings: [
  316. .headerSearchPath("../.."),
  317. ]
  318. ),
  319. .target(
  320. name: "FirebaseDynamicLinks",
  321. dependencies: ["FirebaseCore"],
  322. path: "FirebaseDynamicLinks/Sources",
  323. publicHeadersPath: "Public",
  324. cSettings: [
  325. .headerSearchPath("../../"),
  326. .define("FIRDynamicLinks3P", to: "1"),
  327. .define("GIN_SCION_LOGGING", to: "1"),
  328. .define("FIRDynamicLinks_VERSION", to: "0.0.1"), // TODO: Fix version
  329. ]
  330. ),
  331. .target(
  332. name: "FirebaseFirestore",
  333. dependencies: [
  334. "FirebaseCore",
  335. "leveldb",
  336. .product(name: "nanopb", package: "nanopb"),
  337. .product(name: "abseil", package: "abseil"),
  338. .product(name: "gRPC-cpp", package: "gRPC"),
  339. ],
  340. path: "Firestore",
  341. exclude: [
  342. "CHANGELOG.md",
  343. "CMakeLists.txt",
  344. "Example/",
  345. "Protos/CMakeLists.txt",
  346. "Protos/Podfile",
  347. "Protos/README.md",
  348. "Protos/build_protos.py",
  349. "Protos/cpp/",
  350. "Protos/lib/",
  351. "Protos/nanopb_cpp_generator.py",
  352. "Protos/protos/",
  353. "README.md",
  354. "Source/CMakeLists.txt",
  355. "Swift/",
  356. "core/CMakeLists.txt",
  357. "core/src/util/config_detected.h.in",
  358. "core/test/",
  359. "fuzzing/",
  360. "test.sh",
  361. "third_party/",
  362. // Exclude alternate implementations for other platforms
  363. "core/src/api/input_validation_std.cc",
  364. "core/src/remote/connectivity_monitor_noop.cc",
  365. "core/src/util/filesystem_win.cc",
  366. "core/src/util/hard_assert_stdio.cc",
  367. "core/src/util/log_stdio.cc",
  368. "core/src/util/secure_random_openssl.cc",
  369. ],
  370. sources: [
  371. "Source/",
  372. "Protos/nanopb/",
  373. "core/include/",
  374. "core/src",
  375. ],
  376. publicHeadersPath: "Source/Public",
  377. cSettings: [
  378. .headerSearchPath("../"),
  379. .headerSearchPath("Source/Public/FirebaseFirestore"),
  380. .headerSearchPath("Protos/nanopb"),
  381. .define("PB_FIELD_32BIT", to: "1"),
  382. .define("PB_NO_PACKED_STRUCTS", to: "1"),
  383. .define("PB_ENABLE_MALLOC", to: "1"),
  384. .define("FIRFirestore_VERSION", to: "0.0.1"), // TODO: Fix version
  385. ]
  386. ),
  387. .target(
  388. name: "FirebaseFirestoreSwift",
  389. dependencies: ["FirebaseFirestore"],
  390. path: "Firestore",
  391. exclude: [
  392. "CHANGELOG.md",
  393. "CMakeLists.txt",
  394. "Example/",
  395. "Protos/",
  396. "README.md",
  397. "Source/",
  398. "core/",
  399. "fuzzing/",
  400. "test.sh",
  401. "Swift/CHANGELOG.md",
  402. "Swift/README.md",
  403. "Swift/Tests/",
  404. "third_party/FirestoreEncoder/LICENSE",
  405. "third_party/FirestoreEncoder/METADATA",
  406. ],
  407. sources: [
  408. "Swift/Source/",
  409. "third_party/FirestoreEncoder/",
  410. ]
  411. ),
  412. .target(
  413. name: "FirebaseFunctions",
  414. dependencies: [
  415. "FirebaseCore",
  416. .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher"),
  417. ],
  418. path: "Functions/FirebaseFunctions",
  419. publicHeadersPath: "Public",
  420. cSettings: [
  421. .headerSearchPath("../../"),
  422. .define("FIRFunctions_VERSION", to: "0.0.1"), // TODO: Fix version
  423. ]
  424. ),
  425. .target(
  426. name: "FirebaseInAppMessaging",
  427. dependencies: [
  428. "FirebaseCore",
  429. "FirebaseInstallations",
  430. "FirebaseABTesting",
  431. "GoogleUtilities_Environment",
  432. .product(name: "nanopb", package: "nanopb"),
  433. ],
  434. path: "FirebaseInAppMessaging/Sources",
  435. exclude: [
  436. "DefaultUI/CHANGELOG.md",
  437. "DefaultUI/README.md",
  438. ],
  439. resources: [.process("Resources")],
  440. publicHeadersPath: "Public",
  441. cSettings: [
  442. .headerSearchPath("../../"),
  443. .define("FIRInAppMessaging_LIB_VERSION", to: "0.0.1"), // TODO: Fix version
  444. .define("PB_FIELD_32BIT", to: "1"),
  445. .define("PB_NO_PACKED_STRUCTS", to: "1"),
  446. .define("PB_ENABLE_MALLOC", to: "1"),
  447. ]
  448. ),
  449. // .target(
  450. // name: "FirebaseInstanceID",
  451. // dependencies: ["FirebaseCore", "FirebaseInstallations",
  452. // "GoogleUtilities_Environment", "GoogleUtilities_UserDefaults"],
  453. // path: "Firebase/InstanceID",
  454. // publicHeadersPath: "Public",
  455. // cSettings: [
  456. // .headerSearchPath("../../"),
  457. // .define("FIRInstanceID_LIB_VERSION", to: "0.0.1"), // TODO: Fix version
  458. // ]
  459. // ),
  460. .target(
  461. name: "FirebaseInstallations",
  462. dependencies: ["FirebaseCore", .product(name: "FBLPromises", package: "Promises"),
  463. "GoogleUtilities_Environment", "GoogleUtilities_UserDefaults"],
  464. path: "FirebaseInstallations/Source/Library",
  465. publicHeadersPath: "Public",
  466. cSettings: [
  467. .headerSearchPath("../../../"),
  468. ]
  469. ),
  470. .target(
  471. name: "SharedTestUtilities",
  472. dependencies: ["FirebaseCore"],
  473. path: "SharedTestUtilities",
  474. publicHeadersPath: "./",
  475. cSettings: [
  476. .headerSearchPath("../"),
  477. ]
  478. ),
  479. .target(
  480. name: "FirebaseRemoteConfig",
  481. dependencies: [
  482. "FirebaseCore",
  483. "FirebaseABTesting",
  484. "FirebaseInstallations",
  485. "GoogleUtilities_NSData",
  486. ],
  487. path: "FirebaseRemoteConfig/Sources",
  488. publicHeadersPath: "Public",
  489. cSettings: [
  490. .headerSearchPath("../../"),
  491. .define("FIRRemoteConfig_VERSION", to: "0.0.1"), // TODO: Fix version
  492. ]
  493. ),
  494. .testTarget(
  495. name: "RemoteConfigUnit",
  496. dependencies: ["FirebaseRemoteConfig", "OCMock"],
  497. path: "FirebaseRemoteConfig/Tests/Unit",
  498. exclude: [
  499. // Need to be evaluated/ported to RC V2.
  500. "RCNConfigAnalyticsTest.m",
  501. "RCNConfigSettingsTest.m",
  502. "RCNConfigTest.m",
  503. "RCNRemoteConfig+FIRAppTest.m",
  504. "RCNThrottlingTests.m",
  505. ],
  506. resources: [
  507. .process("SecondApp-GoogleService-Info.plist"),
  508. .process("Defaults-testInfo.plist"),
  509. .process("TestABTPayload.txt"),
  510. ],
  511. cSettings: [
  512. .headerSearchPath("../../.."),
  513. ]
  514. ),
  515. .target(
  516. name: "FirebaseStorage",
  517. dependencies: [
  518. "FirebaseCore",
  519. .product(name: "GTMSessionFetcherCore", package: "GTMSessionFetcher"),
  520. ],
  521. path: "FirebaseStorage/Sources",
  522. publicHeadersPath: "Public",
  523. cSettings: [
  524. .headerSearchPath("../../"),
  525. .define("FIRStorage_VERSION", to: "0.0.1"), // TODO: Fix version
  526. ]
  527. ),
  528. .testTarget(
  529. name: "StorageUnit",
  530. dependencies: ["FirebaseStorage", "OCMock", "SharedTestUtilities"],
  531. path: "FirebaseStorage/Tests/Unit",
  532. cSettings: [
  533. .headerSearchPath("../../.."),
  534. ]
  535. ),
  536. .target(
  537. name: "FirebaseStorageSwift",
  538. dependencies: ["FirebaseStorage"],
  539. path: "FirebaseStorageSwift/Sources"
  540. ),
  541. .target(
  542. name: "GoogleDataTransport",
  543. dependencies: [
  544. .product(name: "nanopb", package: "nanopb"),
  545. ],
  546. path: "GoogleDataTransport",
  547. exclude: [
  548. "CHANGELOG.md",
  549. "README.md",
  550. "generate_project.sh",
  551. "GDTCCTWatchOSTestApp/",
  552. "GDTWatchOSTestApp/",
  553. "GDTCCTTestApp/",
  554. "GDTTestApp/",
  555. "GDTCCTTests/",
  556. "GDTCORTests/",
  557. "ProtoSupport/",
  558. ],
  559. sources: [
  560. "GDTCORLibrary",
  561. "GDTCCTLibrary",
  562. ],
  563. publicHeadersPath: "GDTCORLibrary/Public",
  564. cSettings: [
  565. .headerSearchPath("../"),
  566. .define("GDTCOR_VERSION", to: "0.0.1"),
  567. .define("PB_FIELD_32BIT", to: "1"),
  568. .define("PB_NO_PACKED_STRUCTS", to: "1"),
  569. .define("PB_ENABLE_MALLOC", to: "1"),
  570. ]
  571. ),
  572. .testTarget(
  573. name: "swift-test",
  574. dependencies: [
  575. "FirebaseAuth",
  576. "FirebaseABTesting",
  577. "Firebase",
  578. "FirebaseCrashlytics",
  579. "FirebaseCore",
  580. "FirebaseDatabase",
  581. "FirebaseDynamicLinks",
  582. "FirebaseFirestore",
  583. "FirebaseFirestoreSwift",
  584. "FirebaseFunctions",
  585. "FirebaseInAppMessaging",
  586. "FirebaseInstallations",
  587. // "FirebaseInstanceID",
  588. "FirebaseRemoteConfig",
  589. "FirebaseStorage",
  590. "FirebaseStorageSwift",
  591. "GoogleDataTransport",
  592. "GoogleUtilities_AppDelegateSwizzler",
  593. "GoogleUtilities_Environment",
  594. // "GoogleUtilities_ISASwizzler", // Build needs to disable ARC.
  595. "GoogleUtilities_Logger",
  596. "GoogleUtilities_MethodSwizzler",
  597. "GoogleUtilities_Network",
  598. "GoogleUtilities_NSData",
  599. "GoogleUtilities_Reachability",
  600. "GoogleUtilities_UserDefaults",
  601. .product(name: "nanopb", package: "nanopb"),
  602. ],
  603. path: "SwiftPMTests/swift-test"
  604. ),
  605. .testTarget(
  606. name: "objc-import-test",
  607. dependencies: [
  608. "FirebaseAuth",
  609. "FirebaseABTesting",
  610. "Firebase",
  611. "FirebaseCrashlytics",
  612. "FirebaseCore",
  613. "FirebaseDatabase",
  614. "FirebaseDynamicLinks",
  615. "FirebaseFirestore",
  616. "FirebaseFunctions",
  617. "FirebaseInAppMessaging",
  618. "FirebaseInstallations",
  619. "FirebaseRemoteConfig",
  620. "FirebaseStorage",
  621. ],
  622. path: "SwiftPMTests/objc-import-test"
  623. ),
  624. .target(
  625. name: "GoogleUtilities_AppDelegateSwizzler",
  626. dependencies: ["GoogleUtilities_Environment", "GoogleUtilities_Logger",
  627. "GoogleUtilities_Network"],
  628. path: "GoogleUtilities",
  629. exclude: [
  630. "CHANGELOG.md",
  631. "CMakeLists.txt",
  632. "LICENSE",
  633. "README.md",
  634. "AppDelegateSwizzler/README.md",
  635. "Environment/",
  636. "Network/",
  637. "ISASwizzler/",
  638. "Logger/",
  639. "MethodSwizzler/",
  640. "NSData+zlib/",
  641. "Reachability",
  642. "SwizzlerTestHelpers/",
  643. "Tests",
  644. "UserDefaults/",
  645. ],
  646. sources: [
  647. "AppDelegateSwizzler/",
  648. "SceneDelegateSwizzler/",
  649. "Common/*.h",
  650. ],
  651. publicHeadersPath: "AppDelegateSwizzler/Public",
  652. cSettings: [
  653. .headerSearchPath("../"),
  654. ]
  655. ),
  656. .target(
  657. name: "GoogleUtilities_Environment",
  658. dependencies: [.product(name: "FBLPromises", package: "Promises")],
  659. path: "GoogleUtilities/Environment",
  660. exclude: ["third_party/LICENSE"],
  661. publicHeadersPath: "Private",
  662. cSettings: [
  663. .headerSearchPath("../../"),
  664. ]
  665. ),
  666. .target(
  667. name: "GoogleUtilities_Logger",
  668. dependencies: ["GoogleUtilities_Environment"],
  669. path: "GoogleUtilities/Logger",
  670. publicHeadersPath: "Public",
  671. cSettings: [
  672. .headerSearchPath("../../"),
  673. ]
  674. ),
  675. // TODO: ISA_Swizzler requires building without ARC.
  676. .target(
  677. name: "GoogleUtilities_MethodSwizzler",
  678. dependencies: ["GoogleUtilities_Logger"],
  679. path: "GoogleUtilities/MethodSwizzler",
  680. publicHeadersPath: "Private",
  681. cSettings: [
  682. .headerSearchPath("../../"),
  683. ]
  684. ),
  685. .target(
  686. name: "GoogleUtilities_Network",
  687. dependencies: ["GoogleUtilities_Logger", "GoogleUtilities_NSData",
  688. "GoogleUtilities_Reachability"],
  689. path: "GoogleUtilities/Network",
  690. publicHeadersPath: "Public",
  691. cSettings: [
  692. .headerSearchPath("../.."),
  693. ]
  694. ),
  695. .target(
  696. name: "GoogleUtilities_NSData",
  697. path: "GoogleUtilities/NSData+zlib",
  698. publicHeadersPath: "Public",
  699. cSettings: [
  700. .headerSearchPath("../.."),
  701. ],
  702. linkerSettings: [
  703. .linkedLibrary("z"),
  704. ]
  705. ),
  706. .target(
  707. name: "GoogleUtilities_Reachability",
  708. dependencies: ["GoogleUtilities_Logger"],
  709. path: "GoogleUtilities/Reachability",
  710. publicHeadersPath: "Private",
  711. cSettings: [
  712. .headerSearchPath("../../"),
  713. ]
  714. ),
  715. .target(
  716. name: "GoogleUtilities_UserDefaults",
  717. dependencies: ["GoogleUtilities_Logger"],
  718. path: "GoogleUtilities/UserDefaults",
  719. publicHeadersPath: "Private",
  720. cSettings: [
  721. .headerSearchPath("../../"),
  722. ]
  723. ),
  724. // TODO: - need to port Network/third_party/GTMHTTPServer.m to ARC.
  725. // .testTarget(
  726. // name: "UtilitiesUnit",
  727. // dependencies: [
  728. // "OCMock",
  729. // "GoogleUtilities_AppDelegateSwizzler",
  730. // "GoogleUtilities_Environment",
  731. // // "GoogleUtilities_ISASwizzler", // Build needs to disable ARC.
  732. // "GoogleUtilities_Logger",
  733. // "GoogleUtilities_MethodSwizzler",
  734. // "GoogleUtilities_Network",
  735. // "GoogleUtilities_NSData",
  736. // "GoogleUtilities_Reachability",
  737. // "GoogleUtilities_UserDefaults",
  738. // ],
  739. // path: "GoogleUtilities/Tests/Unit",
  740. // exclude: [
  741. // "Network/third_party/LICENSE",
  742. // "Network/third_party/GTMHTTPServer.m", // Requires disabling ARC
  743. // ],
  744. // cSettings: [
  745. // .headerSearchPath("../../.."),
  746. // ]
  747. // ),
  748. ],
  749. cLanguageStandard: .c99,
  750. cxxLanguageStandard: CXXLanguageStandard.gnucxx14
  751. )