| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400 |
- // swift-tools-version:5.6
- // The swift-tools-version declares the minimum version of Swift required to
- // build this package.
- // Copyright 2020 Google LLC
- //
- // Licensed under the Apache License, Version 2.0 (the "License");
- // you may not use this file except in compliance with the License.
- // You may obtain a copy of the License at
- //
- // http://www.apache.org/licenses/LICENSE-2.0
- //
- // Unless required by applicable law or agreed to in writing, software
- // distributed under the License is distributed on an "AS IS" BASIS,
- // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- // See the License for the specific language governing permissions and
- // limitations under the License.
- import class Foundation.ProcessInfo
- import PackageDescription
- let firebaseVersion = "10.11.0"
- let package = Package(
- name: "Firebase",
- platforms: [.iOS(.v11), .macCatalyst(.v13), .macOS(.v10_13), .tvOS(.v12), .watchOS(.v7)],
- products: [
- .library(
- name: "FirebaseAnalytics",
- targets: ["FirebaseAnalyticsTarget"]
- ),
- // This library is not designed to be imported into client source code.
- .library(
- name: "FirebaseAnalyticsWithoutAdIdSupport",
- targets: ["FirebaseAnalyticsWithoutAdIdSupportTarget"]
- ),
- // This library is not designed to be imported into client source code.
- .library(
- name: "FirebaseAnalyticsOnDeviceConversion",
- targets: ["FirebaseAnalyticsOnDeviceConversionTarget"]
- ),
- .library(
- name: "FirebaseAnalyticsSwift",
- targets: ["FirebaseAnalyticsSwiftTarget"]
- ),
- .library(
- name: "FirebaseAuth",
- targets: ["FirebaseAuth"]
- ),
- .library(
- name: "FirebaseAppCheck",
- targets: ["FirebaseAppCheck"]
- ),
- .library(
- name: "FirebaseAppDistribution-Beta",
- targets: ["FirebaseAppDistributionTarget"]
- ),
- .library(
- name: "FirebaseAuthCombine-Community",
- targets: ["FirebaseAuthCombineSwift"]
- ),
- .library(
- name: "FirebaseFirestoreCombine-Community",
- targets: ["FirebaseFirestoreCombineSwift"]
- ),
- .library(
- name: "FirebaseFunctionsCombine-Community",
- targets: ["FirebaseFunctionsCombineSwift"]
- ),
- .library(
- name: "FirebaseStorageCombine-Community",
- targets: ["FirebaseStorageCombineSwift"]
- ),
- .library(
- name: "FirebaseCrashlytics",
- targets: ["FirebaseCrashlytics"]
- ),
- .library(
- name: "FirebaseDatabase",
- targets: ["FirebaseDatabase"]
- ),
- .library(
- name: "FirebaseDatabaseSwift",
- targets: ["FirebaseDatabaseSwift"]
- ),
- .library(
- name: "FirebaseDynamicLinks",
- targets: ["FirebaseDynamicLinksTarget"]
- ),
- .library(
- name: "FirebaseFirestore",
- targets: ["FirebaseFirestoreTarget"]
- ),
- .library(
- name: "FirebaseFirestoreSwift",
- targets: ["FirebaseFirestoreSwiftTarget"]
- ),
- .library(
- name: "FirebaseFunctions",
- targets: ["FirebaseFunctions"]
- ),
- .library(
- name: "FirebaseInAppMessaging-Beta",
- targets: ["FirebaseInAppMessagingTarget"]
- ),
- .library(
- name: "FirebaseInAppMessagingSwift-Beta",
- targets: ["FirebaseInAppMessagingSwift"]
- ),
- .library(
- name: "FirebaseInstallations",
- targets: ["FirebaseInstallations"]
- ),
- .library(
- name: "FirebaseMessaging",
- targets: ["FirebaseMessaging"]
- ),
- .library(
- name: "FirebaseMLModelDownloader",
- targets: ["FirebaseMLModelDownloader"]
- ),
- .library(
- name: "FirebasePerformance",
- targets: ["FirebasePerformanceTarget"]
- ),
- .library(
- name: "FirebaseRemoteConfig",
- targets: ["FirebaseRemoteConfig"]
- ),
- .library(
- name: "FirebaseRemoteConfigSwift",
- targets: ["FirebaseRemoteConfigSwift"]
- ),
- .library(
- name: "FirebaseStorage",
- targets: ["FirebaseStorage"]
- ),
- .executable(
- name: "CxxInterop",
- targets: ["CxxInterop"]
- ),
- ],
- dependencies: [
- .package(
- url: "https://github.com/google/promises.git",
- "2.1.0" ..< "3.0.0"
- ),
- .package(
- url: "https://github.com/apple/swift-protobuf.git",
- "1.19.0" ..< "2.0.0"
- ),
- googleAppMeasurementDependency(),
- .package(
- url: "https://github.com/google/GoogleDataTransport.git",
- "9.2.0" ..< "10.0.0"
- ),
- .package(
- url: "https://github.com/google/GoogleUtilities.git",
- "7.11.0" ..< "8.0.0"
- ),
- .package(
- url: "https://github.com/google/gtm-session-fetcher.git",
- "2.1.0" ..< "4.0.0"
- ),
- .package(
- url: "https://github.com/firebase/nanopb.git",
- "2.30909.0" ..< "2.30910.0"
- ),
- .package(
- url: "https://github.com/firebase/abseil-cpp-SwiftPM.git",
- "0.20220203.1" ..< "0.20220204.0"
- ),
- .package(
- url: "https://github.com/grpc/grpc-ios.git",
- "1.44.0-grpc" ..< "1.45.0-grpc"
- ),
- .package(
- url: "https://github.com/erikdoe/ocmock.git",
- revision: "c5eeaa6dde7c308a5ce48ae4d4530462dd3a1110"
- ),
- .package(
- url: "https://github.com/firebase/leveldb.git",
- "1.22.2" ..< "1.23.0"
- ),
- .package(
- url: "https://github.com/SlaunchaMan/GCDWebServer.git",
- revision: "935e2736044e71e5341663c3cc9a335ba6867a2b"
- ),
- ],
- targets: [
- .target(
- name: "Firebase",
- path: "CoreOnly/Sources",
- publicHeadersPath: "./"
- ),
- .target(
- name: "FirebaseCore",
- dependencies: [
- "Firebase",
- "FirebaseCoreInternal",
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "GULLogger", package: "GoogleUtilities"),
- ],
- path: "FirebaseCore/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../.."),
- .define("Firebase_VERSION", to: firebaseVersion),
- // TODO: - Add support for cflags cSetting so that we can set the -fno-autolink option
- ],
- linkerSettings: [
- .linkedFramework("UIKit", .when(platforms: [.iOS, .macCatalyst, .tvOS])),
- .linkedFramework("AppKit", .when(platforms: [.macOS])),
- ]
- ),
- .testTarget(
- name: "CoreUnit",
- dependencies: [
- "FirebaseCore",
- "SharedTestUtilities",
- "HeartbeatLoggingTestUtils",
- .product(name: "OCMock", package: "ocmock"),
- ],
- path: "FirebaseCore/Tests/Unit",
- exclude: ["Resources/GoogleService-Info.plist"],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- // MARK: - Firebase Core Extension
- // Extension of FirebaseCore for consuming by Swift product SDKs.
- // When depending on `FirebaseCoreExtension`, also depend on `FirebaseCore`
- // to avoid potential linker issues.
- .target(
- name: "FirebaseCoreExtension",
- path: "FirebaseCore/Extension",
- publicHeadersPath: ".",
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- // MARK: - Firebase Core Internal
- // Shared collection of APIs for internal FirebaseCore usage.
- .target(
- name: "FirebaseCoreInternal",
- dependencies: [
- .product(name: "GULNSData", package: "GoogleUtilities"),
- ],
- path: "FirebaseCore/Internal/Sources"
- ),
- .target(
- name: "HeartbeatLoggingTestUtils",
- dependencies: ["FirebaseCoreInternal"],
- path: "HeartbeatLoggingTestUtils/Sources"
- ),
- .testTarget(
- name: "FirebaseCoreInternalTests",
- dependencies: [
- "FirebaseCoreInternal",
- "HeartbeatLoggingTestUtils",
- ],
- path: "FirebaseCore/Internal/Tests"
- ),
- .target(
- name: "FirebaseABTesting",
- dependencies: ["FirebaseCore"],
- path: "FirebaseABTesting/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- .testTarget(
- name: "ABTestingUnit",
- dependencies: ["FirebaseABTesting", .product(name: "OCMock", package: "ocmock")],
- path: "FirebaseABTesting/Tests/Unit",
- resources: [.process("Resources")],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- .target(
- name: "FirebaseAnalyticsTarget",
- dependencies: [.target(name: "FirebaseAnalyticsWrapper",
- condition: .when(platforms: [.iOS, .macCatalyst, .macOS,
- .tvOS]))],
- path: "SwiftPM-PlatformExclude/FirebaseAnalyticsWrap"
- ),
- .target(
- name: "FirebaseAnalyticsWrapper",
- dependencies: [
- .target(
- name: "FirebaseAnalytics",
- condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS])
- ),
- .product(name: "GoogleAppMeasurement",
- package: "GoogleAppMeasurement",
- condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS])),
- "FirebaseCore",
- "FirebaseInstallations",
- .product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"),
- .product(name: "GULMethodSwizzler", package: "GoogleUtilities"),
- .product(name: "GULNSData", package: "GoogleUtilities"),
- .product(name: "GULNetwork", package: "GoogleUtilities"),
- .product(name: "nanopb", package: "nanopb"),
- ],
- path: "FirebaseAnalyticsWrapper",
- linkerSettings: [
- .linkedLibrary("sqlite3"),
- .linkedLibrary("c++"),
- .linkedLibrary("z"),
- .linkedFramework("StoreKit"),
- ]
- ),
- .binaryTarget(
- name: "FirebaseAnalytics",
- url: "https://dl.google.com/firebase/ios/swiftpm/10.10.0/FirebaseAnalytics.zip",
- checksum: "335d26f7cc88f2bb9196826344ff772f762ce0cc8a1918dfaa79282424bbab5c"
- ),
- .target(
- name: "FirebaseAnalyticsSwiftTarget",
- dependencies: [.target(name: "FirebaseAnalyticsSwift",
- condition: .when(platforms: [.iOS, .macCatalyst, .macOS,
- .tvOS]))],
- path: "SwiftPM-PlatformExclude/FirebaseAnalyticsSwiftWrap"
- ),
- .target(
- name: "FirebaseAnalyticsSwift",
- dependencies: ["FirebaseAnalyticsWrapper"],
- path: "FirebaseAnalyticsSwift/Sources"
- ),
- .testTarget(
- name: "AnalyticsSwiftUnit",
- dependencies: ["FirebaseAnalyticsSwift"],
- path: "FirebaseAnalyticsSwift/Tests/SwiftUnit"
- ),
- .testTarget(
- name: "AnalyticsObjCAPI",
- dependencies: ["FirebaseAnalyticsSwift"],
- path: "FirebaseAnalyticsSwift/Tests/ObjCAPI"
- ),
- .target(
- name: "FirebaseAnalyticsWithoutAdIdSupportTarget",
- dependencies: [.target(name: "FirebaseAnalyticsWithoutAdIdSupportWrapper",
- condition: .when(platforms: [.iOS, .macCatalyst, .macOS,
- .tvOS]))],
- path: "SwiftPM-PlatformExclude/FirebaseAnalyticsWithoutAdIdSupportWrap"
- ),
- .target(
- name: "FirebaseAnalyticsWithoutAdIdSupportWrapper",
- dependencies: [
- .target(
- name: "FirebaseAnalytics",
- condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS])
- ),
- .product(name: "GoogleAppMeasurementWithoutAdIdSupport",
- package: "GoogleAppMeasurement",
- condition: .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS])),
- "FirebaseCore",
- "FirebaseInstallations",
- .product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"),
- .product(name: "GULMethodSwizzler", package: "GoogleUtilities"),
- .product(name: "GULNSData", package: "GoogleUtilities"),
- .product(name: "GULNetwork", package: "GoogleUtilities"),
- .product(name: "nanopb", package: "nanopb"),
- ],
- path: "FirebaseAnalyticsWithoutAdIdSupportWrapper",
- linkerSettings: [
- .linkedLibrary("sqlite3"),
- .linkedLibrary("c++"),
- .linkedLibrary("z"),
- .linkedFramework("StoreKit"),
- ]
- ),
- .target(
- name: "FirebaseAnalyticsOnDeviceConversionTarget",
- dependencies: [
- .product(name: "GoogleAppMeasurementOnDeviceConversion",
- package: "GoogleAppMeasurement",
- condition: .when(platforms: [.iOS])),
- ],
- path: "FirebaseAnalyticsOnDeviceConversionWrapper",
- linkerSettings: [
- .linkedLibrary("c++"),
- ]
- ),
- .target(
- name: "FirebaseAppDistributionTarget",
- dependencies: [.target(name: "FirebaseAppDistribution",
- condition: .when(platforms: [.iOS]))],
- path: "SwiftPM-PlatformExclude/FirebaseAppDistributionWrap"
- ),
- .target(
- name: "FirebaseAppDistribution",
- dependencies: [
- "FirebaseCore",
- "FirebaseInstallations",
- .product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"),
- .product(name: "GULUserDefaults", package: "GoogleUtilities"),
- ],
- path: "FirebaseAppDistribution/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- .testTarget(
- name: "AppDistributionUnit",
- dependencies: ["FirebaseAppDistribution", .product(name: "OCMock", package: "ocmock")],
- path: "FirebaseAppDistribution/Tests/Unit",
- exclude: ["Swift/"],
- resources: [.process("Resources")],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- .testTarget(
- name: "AppDistributionUnitSwift",
- dependencies: ["FirebaseAppDistribution"],
- path: "FirebaseAppDistribution/Tests/Unit/Swift",
- cSettings: [
- .headerSearchPath("../../../.."),
- ]
- ),
- .target(
- name: "FirebaseAuth",
- dependencies: [
- "FirebaseCore",
- .product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"),
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "GTMSessionFetcherCore", package: "gtm-session-fetcher"),
- ],
- path: "FirebaseAuth/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- ],
- linkerSettings: [
- .linkedFramework("Security"),
- .linkedFramework("SafariServices", .when(platforms: [.iOS])),
- ]
- ),
- // Internal headers only for consuming from Swift.
- .target(
- name: "FirebaseAuthInterop",
- path: "FirebaseAuth/Interop",
- exclude: [
- "CMakeLists.txt",
- ],
- publicHeadersPath: ".",
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- .testTarget(
- name: "AuthUnit",
- dependencies: [
- "FirebaseAuth",
- "HeartbeatLoggingTestUtils",
- .product(name: "OCMock", package: "ocmock"),
- ],
- path: "FirebaseAuth/Tests/Unit",
- exclude: [
- "FIRAuthKeychainServicesTests.m", // TODO: figure out SPM keychain testing
- "FIRAuthTests.m",
- "FIRUserTests.m",
- ],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- .target(
- name: "FirebaseAuthCombineSwift",
- dependencies: ["FirebaseAuth"],
- path: "FirebaseCombineSwift/Sources/Auth"
- ),
- .target(
- name: "FirebaseFirestoreCombineSwift",
- dependencies: [
- "FirebaseFirestoreTarget",
- "FirebaseFirestoreSwift",
- ],
- path: "FirebaseCombineSwift/Sources/Firestore"
- ),
- .target(
- name: "FirebaseStorageCombineSwift",
- dependencies: [
- "FirebaseStorage",
- ],
- path: "FirebaseCombineSwift/Sources/Storage"
- ),
- .target(
- name: "FirebaseCrashlytics",
- dependencies: ["FirebaseCore", "FirebaseInstallations", "FirebaseSessions",
- .product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "FBLPromises", package: "Promises"),
- .product(name: "nanopb", package: "nanopb")],
- path: "Crashlytics",
- exclude: [
- "run",
- "CHANGELOG.md",
- "LICENSE",
- "README.md",
- "ProtoSupport/",
- "UnitTests/",
- "generate_project.sh",
- "upload-symbols",
- "third_party/libunwind/LICENSE",
- ],
- sources: [
- "Crashlytics/",
- "Protogen/",
- "Shared/",
- "third_party/libunwind/dwarf.h",
- ],
- publicHeadersPath: "Crashlytics/Public",
- cSettings: [
- .headerSearchPath(".."),
- .define("DISPLAY_VERSION", to: firebaseVersion),
- .define("CLS_SDK_NAME", to: "Crashlytics iOS SDK", .when(platforms: [.iOS])),
- .define(
- "CLS_SDK_NAME",
- to: "Crashlytics macOS SDK",
- .when(platforms: [.macOS, .macCatalyst])
- ),
- .define("CLS_SDK_NAME", to: "Crashlytics tvOS SDK", .when(platforms: [.tvOS])),
- .define(
- "CLS_SDK_NAME",
- to: "Crashlytics watchOS SDK",
- .when(platforms: [.watchOS])
- ),
- .define("PB_FIELD_32BIT", to: "1"),
- .define("PB_NO_PACKED_STRUCTS", to: "1"),
- .define("PB_ENABLE_MALLOC", to: "1"),
- ],
- linkerSettings: [
- .linkedFramework("Security"),
- .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])),
- ]
- ),
- .testTarget(
- name: "FirebaseCrashlyticsUnit",
- dependencies: ["FirebaseCrashlytics", .product(name: "OCMock", package: "ocmock")],
- path: "Crashlytics/UnitTests",
- resources: [
- .copy("FIRCLSMachO/machO_data"),
- .copy("Data"),
- ],
- cSettings: [
- .headerSearchPath("../.."),
- .define("DISPLAY_VERSION", to: firebaseVersion),
- .define("CLS_SDK_NAME", to: "Crashlytics iOS SDK", .when(platforms: [.iOS])),
- .define(
- "CLS_SDK_NAME",
- to: "Crashlytics macOS SDK",
- .when(platforms: [.macOS, .macCatalyst])
- ),
- .define("CLS_SDK_NAME", to: "Crashlytics tvOS SDK", .when(platforms: [.tvOS])),
- .define(
- "CLS_SDK_NAME",
- to: "Crashlytics watchOS SDK",
- .when(platforms: [.watchOS])
- ),
- ]
- ),
- .target(
- name: "FirebaseDatabase",
- dependencies: [
- "FirebaseCore",
- "leveldb",
- ],
- path: "FirebaseDatabase/Sources",
- exclude: [
- "third_party/Wrap-leveldb/LICENSE",
- "third_party/SocketRocket/LICENSE",
- "third_party/FImmutableSortedDictionary/LICENSE",
- "third_party/SocketRocket/aa2297808c225710e267afece4439c256f6efdb3",
- ],
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- ],
- linkerSettings: [
- .linkedFramework("CFNetwork"),
- .linkedFramework("Security"),
- .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])),
- .linkedFramework("WatchKit", .when(platforms: [.watchOS])),
- ]
- ),
- .testTarget(
- name: "DatabaseUnit",
- dependencies: [
- "FirebaseDatabase",
- "SharedTestUtilities",
- .product(name: "OCMock", package: "ocmock"),
- ],
- path: "FirebaseDatabase/Tests/",
- exclude: [
- // Disable Swift tests as mixed targets are not supported (Xcode 12.4).
- "Unit/Swift",
- "Integration/",
- ],
- resources: [.process("Resources")],
- cSettings: [
- .headerSearchPath("../.."),
- ]
- ),
- .testTarget(
- name: "DatabaseUnitSwift",
- dependencies: ["FirebaseDatabase"],
- path: "FirebaseDatabase/Tests/Unit/Swift",
- cSettings: [
- .headerSearchPath("../.."),
- ]
- ),
- .target(
- name: "FirebaseDatabaseSwift",
- dependencies: ["FirebaseDatabase", "FirebaseSharedSwift"],
- path: "FirebaseDatabaseSwift/Sources"
- ),
- .testTarget(
- name: "FirebaseDatabaseSwiftTests",
- dependencies: ["FirebaseDatabase", "FirebaseDatabaseSwift"],
- path: "FirebaseDatabaseSwift/Tests/"
- ),
- .target(
- name: "FirebaseSharedSwift",
- path: "FirebaseSharedSwift/Sources",
- exclude: [
- "third_party/FirebaseDataEncoder/LICENSE",
- "third_party/FirebaseDataEncoder/METADATA",
- ]
- ),
- .testTarget(
- name: "FirebaseSharedSwiftTests",
- dependencies: ["FirebaseSharedSwift"],
- path: "FirebaseSharedSwift/Tests/"
- ),
- .target(
- name: "FirebaseDynamicLinksTarget",
- dependencies: [.target(name: "FirebaseDynamicLinks",
- condition: .when(platforms: [.iOS]))],
- path: "SwiftPM-PlatformExclude/FirebaseDynamicLinksWrap"
- ),
- .target(
- name: "FirebaseDynamicLinks",
- dependencies: ["FirebaseCore"],
- path: "FirebaseDynamicLinks/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- .define("FIRDynamicLinks3P", to: "1"),
- .define("GIN_SCION_LOGGING", to: "1"),
- ],
- linkerSettings: [
- .linkedFramework("QuartzCore"),
- ]
- ),
- .target(
- name: "FirebaseFirestoreTarget",
- dependencies: [
- .target(
- name: "FirebaseFirestore",
- condition: .when(platforms: [.iOS, .macCatalyst, .tvOS, .macOS])
- ),
- .product(name: "abseil", package: "abseil-cpp-SwiftPM"),
- .product(name: "gRPC-cpp", package: "grpc-ios"),
- .product(name: "nanopb", package: "nanopb"),
- "FirebaseCore",
- "leveldb",
- ],
- path: "SwiftPM-PlatformExclude/FirebaseFirestoreWrap",
- linkerSettings: [
- .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])),
- .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS])),
- .linkedLibrary("c++"),
- ]
- ),
- .binaryTarget(
- name: "FirebaseFirestore",
- url: "https://dl.google.com/firebase/ios/bin/firestore/10.10.0/FirebaseFirestore.zip",
- checksum: "4a0070c4bf7e5ab59359dd8a0e68f402f3ec6c1e189fc39cc44ca88418f26ac4"
- ),
- .target(
- name: "FirebaseFirestoreSwiftTarget",
- dependencies: [.target(name: "FirebaseFirestoreSwift",
- condition: .when(platforms: [.iOS, .macCatalyst, .tvOS,
- .macOS]))],
- path: "SwiftPM-PlatformExclude/FirebaseFirestoreSwiftWrap"
- ),
- .target(
- name: "FirebaseFirestoreSwift",
- dependencies: [
- "FirebaseCore",
- "FirebaseCoreExtension",
- "FirebaseFirestoreTarget",
- "FirebaseSharedSwift",
- ],
- path: "Firestore",
- exclude: [
- "CHANGELOG.md",
- "CMakeLists.txt",
- "Example/",
- "LICENSE",
- "Protos/",
- "README.md",
- "Source/",
- "core/",
- "fuzzing/",
- "test.sh",
- "Swift/CHANGELOG.md",
- "Swift/README.md",
- "Swift/Tests/",
- "third_party/nlohmann_json",
- ],
- sources: [
- "Swift/Source/",
- ]
- ),
- // MARK: - Firebase Functions
- .target(
- name: "FirebaseFunctions",
- dependencies: [
- "FirebaseAppCheckInterop",
- "FirebaseAuthInterop",
- "FirebaseCore",
- "FirebaseCoreExtension",
- "FirebaseMessagingInterop",
- "FirebaseSharedSwift",
- .product(name: "GTMSessionFetcherCore", package: "gtm-session-fetcher"),
- ],
- path: "FirebaseFunctions/Sources"
- ),
- .testTarget(
- name: "FirebaseFunctionsUnit",
- dependencies: ["FirebaseFunctions",
- "FirebaseAppCheckInterop",
- "FirebaseAuthInterop",
- "FirebaseMessagingInterop",
- "SharedTestUtilities"],
- path: "FirebaseFunctions/Tests/Unit",
- cSettings: [
- .headerSearchPath("../../../"),
- ]
- ),
- .testTarget(
- name: "FirebaseFunctionsIntegration",
- dependencies: ["FirebaseFunctions",
- "SharedTestUtilities"],
- path: "FirebaseFunctions/Tests/Integration"
- ),
- .testTarget(
- name: "FirebaseFunctionsObjCIntegration",
- dependencies: ["FirebaseFunctions",
- "SharedTestUtilities"],
- path: "FirebaseFunctions/Tests/ObjCIntegration",
- // See https://forums.swift.org/t/importing-swift-libraries-from-objective-c/56730
- exclude: [
- "ObjCPPAPITests.mm",
- ],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- .target(
- name: "FirebaseFunctionsCombineSwift",
- dependencies: ["FirebaseFunctions"],
- path: "FirebaseCombineSwift/Sources/Functions"
- ),
- .testTarget(
- name: "FunctionsCombineUnit",
- dependencies: ["FirebaseFunctionsCombineSwift",
- "SharedTestUtilities"],
- path: "FirebaseFunctions/Tests/CombineUnit"
- ),
- // MARK: - Firebase In App Messaging
- .target(
- name: "FirebaseInAppMessagingTarget",
- dependencies: [
- .target(name: "FirebaseInAppMessaging", condition: .when(platforms: [.iOS, .tvOS])),
- ],
- path: "SwiftPM-PlatformExclude/FirebaseInAppMessagingWrap"
- ),
- .target(
- name: "FirebaseInAppMessaging",
- dependencies: [
- "FirebaseCore",
- "FirebaseInstallations",
- "FirebaseABTesting",
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "nanopb", package: "nanopb"),
- .target(name: "FirebaseInAppMessaging_iOS", condition: .when(platforms: [.iOS])),
- ],
- path: "FirebaseInAppMessaging/Sources",
- exclude: [
- "DefaultUI/CHANGELOG.md",
- "DefaultUI/README.md",
- ],
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- .define("PB_FIELD_32BIT", to: "1"),
- .define("PB_NO_PACKED_STRUCTS", to: "1"),
- .define("PB_ENABLE_MALLOC", to: "1"),
- ]
- ),
- .target(
- name: "FirebaseInAppMessaging_iOS",
- path: "FirebaseInAppMessaging/iOS",
- resources: [.process("Resources")]
- ),
- .target(
- name: "FirebaseInAppMessagingSwift",
- dependencies: ["FirebaseInAppMessaging"],
- path: "FirebaseInAppMessaging/Swift/Source"
- ),
- .target(
- name: "FirebaseInstallations",
- dependencies: [
- "FirebaseCore",
- .product(name: "FBLPromises", package: "Promises"),
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "GULUserDefaults", package: "GoogleUtilities"),
- ],
- path: "FirebaseInstallations/Source/Library",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../../"),
- ],
- linkerSettings: [
- .linkedFramework("Security"),
- ]
- ),
- .target(
- name: "FirebaseMLModelDownloader",
- dependencies: [
- "FirebaseCore",
- "FirebaseInstallations",
- .product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
- .product(name: "GULLogger", package: "GoogleUtilities"),
- .product(name: "SwiftProtobuf", package: "swift-protobuf"),
- ],
- path: "FirebaseMLModelDownloader/Sources",
- exclude: [
- "proto/firebase_ml_log_sdk.proto",
- ],
- cSettings: [
- .define("FIRMLModelDownloader_VERSION", to: firebaseVersion),
- ]
- ),
- .testTarget(
- name: "FirebaseMLModelDownloaderUnit",
- dependencies: ["FirebaseMLModelDownloader"],
- path: "FirebaseMLModelDownloader/Tests/Unit"
- ),
- .target(
- name: "FirebaseMessaging",
- dependencies: [
- "FirebaseCore",
- "FirebaseInstallations",
- .product(name: "GULAppDelegateSwizzler", package: "GoogleUtilities"),
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "GULReachability", package: "GoogleUtilities"),
- .product(name: "GULUserDefaults", package: "GoogleUtilities"),
- .product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
- .product(name: "nanopb", package: "nanopb"),
- ],
- path: "FirebaseMessaging/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- .define("PB_FIELD_32BIT", to: "1"),
- .define("PB_NO_PACKED_STRUCTS", to: "1"),
- .define("PB_ENABLE_MALLOC", to: "1"),
- ],
- linkerSettings: [
- .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])),
- ]
- ),
- // Internal headers only for consuming from Swift.
- .target(
- name: "FirebaseMessagingInterop",
- path: "FirebaseMessaging/Interop",
- publicHeadersPath: ".",
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- .testTarget(
- name: "MessagingUnit",
- dependencies: [
- "FirebaseMessaging",
- "SharedTestUtilities",
- .product(name: "OCMock", package: "ocmock"),
- ],
- path: "FirebaseMessaging/Tests/UnitTests",
- exclude: [
- "FIRMessagingContextManagerServiceTest.m", // TODO: Adapt its NSBundle usage to SPM.
- ],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- .target(
- name: "FirebasePerformanceTarget",
- dependencies: [.target(name: "FirebasePerformance",
- condition: .when(platforms: [.iOS, .tvOS]))],
- path: "SwiftPM-PlatformExclude/FirebasePerformanceWrap"
- ),
- .target(
- name: "FirebasePerformance",
- dependencies: [
- "FirebaseCore",
- "FirebaseInstallations",
- "FirebaseRemoteConfig",
- "FirebaseSessions",
- .product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "GULISASwizzler", package: "GoogleUtilities"),
- .product(name: "GULMethodSwizzler", package: "GoogleUtilities"),
- .product(name: "GULUserDefaults", package: "GoogleUtilities"),
- .product(name: "nanopb", package: "nanopb"),
- ],
- path: "FirebasePerformance/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- .define("PB_FIELD_32BIT", to: "1"),
- .define("PB_NO_PACKED_STRUCTS", to: "1"),
- .define("PB_ENABLE_MALLOC", to: "1"),
- .define("FIRPerformance_LIB_VERSION", to: firebaseVersion),
- ],
- linkerSettings: [
- .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .tvOS])),
- .linkedFramework("MobileCoreServices", .when(platforms: [.iOS, .tvOS])),
- .linkedFramework("QuartzCore", .when(platforms: [.iOS, .tvOS])),
- ]
- ),
- .testTarget(
- name: "PerformanceUnit",
- dependencies: [
- "FirebasePerformanceTarget",
- "SharedTestUtilities",
- "GCDWebServer",
- .product(name: "OCMock", package: "ocmock"),
- ],
- path: "FirebasePerformance/Tests/Unit",
- resources: [
- .process("FPRURLFilterTests-Info.plist"),
- .process("Server/smallDownloadFile"),
- .process("Server/bigDownloadFile"),
- ],
- cSettings: [
- .headerSearchPath("../../.."),
- .define("PB_FIELD_32BIT", to: "1"),
- .define("PB_NO_PACKED_STRUCTS", to: "1"),
- .define("PB_ENABLE_MALLOC", to: "1"),
- ]
- ),
- .target(
- name: "SharedTestUtilities",
- dependencies: ["FirebaseCore",
- "FirebaseAppCheckInterop",
- "FirebaseAuthInterop",
- "FirebaseMessagingInterop",
- "GoogleDataTransport",
- .product(name: "OCMock", package: "ocmock")],
- path: "SharedTestUtilities",
- publicHeadersPath: "./",
- cSettings: [
- .headerSearchPath("../"),
- ]
- ),
- // MARK: - Firebase Remote Config
- .target(
- name: "FirebaseRemoteConfig",
- dependencies: [
- "FirebaseCore",
- "FirebaseABTesting",
- "FirebaseInstallations",
- .product(name: "GULNSData", package: "GoogleUtilities"),
- ],
- path: "FirebaseRemoteConfig/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- .testTarget(
- name: "RemoteConfigUnit",
- dependencies: ["FirebaseRemoteConfig", .product(name: "OCMock", package: "ocmock")],
- path: "FirebaseRemoteConfig/Tests/Unit",
- exclude: [
- // Need to be evaluated/ported to RC V2.
- "RCNConfigAnalyticsTest.m",
- "RCNConfigSettingsTest.m",
- "RCNConfigTest.m",
- "RCNRemoteConfig+FIRAppTest.m",
- "RCNThrottlingTests.m",
- ],
- resources: [
- .process("SecondApp-GoogleService-Info.plist"),
- .process("Defaults-testInfo.plist"),
- .process("TestABTPayload.txt"),
- ],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- .target(
- name: "FirebaseRemoteConfigSwift",
- dependencies: [
- "FirebaseRemoteConfig",
- "FirebaseSharedSwift",
- ],
- path: "FirebaseRemoteConfigSwift/Sources"
- ),
- .testTarget(
- name: "RemoteConfigFakeConsole",
- dependencies: ["FirebaseRemoteConfigSwift",
- "RemoteConfigFakeConsoleObjC"],
- path: "FirebaseRemoteConfigSwift/Tests",
- exclude: [
- "AccessToken.json",
- "README.md",
- "ObjC/",
- ],
- resources: [
- .process("Defaults-testInfo.plist"),
- ],
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- .target(
- name: "RemoteConfigFakeConsoleObjC",
- dependencies: [.product(name: "OCMock", package: "ocmock")],
- path: "FirebaseRemoteConfigSwift/Tests/ObjC",
- publicHeadersPath: ".",
- cSettings: [
- .headerSearchPath("../../../"),
- ]
- ),
- // MARK: - Firebase Sessions
- .target(
- name: "FirebaseSessions",
- dependencies: [
- "FirebaseCore",
- "FirebaseInstallations",
- "FirebaseCoreExtension",
- "FirebaseSessionsObjC",
- .product(name: "Promises", package: "Promises"),
- .product(name: "GoogleDataTransport", package: "GoogleDataTransport"),
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- ],
- path: "FirebaseSessions/Sources",
- cSettings: [
- .headerSearchPath(".."),
- .define("DISPLAY_VERSION", to: firebaseVersion),
- .define("PB_FIELD_32BIT", to: "1"),
- .define("PB_NO_PACKED_STRUCTS", to: "1"),
- .define("PB_ENABLE_MALLOC", to: "1"),
- ],
- linkerSettings: [
- .linkedFramework("Security"),
- .linkedFramework(
- "SystemConfiguration",
- .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS])
- ),
- ]
- ),
- // The Sessions SDK is Swift-first with Objective-C code to support
- // nanopb. Because Swift Package Manager doesn't support mixed
- // language targets, the ObjC code has been extracted out into
- // a separate target.
- .target(
- name: "FirebaseSessionsObjC",
- dependencies: [
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- .product(name: "nanopb", package: "nanopb"),
- ],
- path: "FirebaseSessions",
- exclude: [
- "README.md",
- "Sources/",
- "Tests/",
- "ProtoSupport/",
- "generate_project.sh",
- "generate_protos.sh",
- "generate_testapp.sh",
- ],
- publicHeadersPath: "SourcesObjC",
- cSettings: [
- .headerSearchPath(".."),
- .define("DISPLAY_VERSION", to: firebaseVersion),
- .define("PB_FIELD_32BIT", to: "1"),
- .define("PB_NO_PACKED_STRUCTS", to: "1"),
- .define("PB_ENABLE_MALLOC", to: "1"),
- ],
- linkerSettings: [
- .linkedFramework("Security"),
- .linkedFramework(
- "SystemConfiguration",
- .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS])
- ),
- ]
- ),
- .testTarget(
- name: "FirebaseSessionsUnit",
- dependencies: ["FirebaseSessions"],
- path: "FirebaseSessions/Tests/Unit"
- ),
- // MARK: - Firebase Storage
- .target(
- name: "FirebaseStorage",
- dependencies: [
- "FirebaseAppCheckInterop",
- "FirebaseAuthInterop",
- "FirebaseCore",
- "FirebaseCoreExtension",
- .product(name: "GTMSessionFetcherCore", package: "gtm-session-fetcher"),
- ],
- path: "FirebaseStorage/Sources"
- ),
- .testTarget(
- name: "FirebaseStorageUnit",
- dependencies: ["FirebaseStorage",
- "SharedTestUtilities"],
- path: "FirebaseStorage/Tests/Unit",
- cSettings: [
- .headerSearchPath("../../../"),
- ]
- ),
- .testTarget(
- name: "StorageObjCIntegration",
- dependencies: ["FirebaseStorage"],
- path: "FirebaseStorage/Tests/ObjCIntegration",
- exclude: [
- // See https://forums.swift.org/t/importing-swift-libraries-from-objective-c/56730
- "FIRStorageIntegrationTests.m",
- "ObjCPPAPITests.mm",
- "Credentials.h",
- ],
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- .testTarget(
- name: "swift-test",
- dependencies: [
- "Firebase",
- "FirebaseAuth",
- "FirebaseAppCheck",
- "FirebaseABTesting",
- "FirebaseAnalytics",
- "FirebaseAnalyticsSwift",
- .target(name: "FirebaseAppDistribution",
- condition: .when(platforms: [.iOS])),
- "FirebaseAuthCombineSwift",
- "FirebaseFirestoreCombineSwift",
- "FirebaseFunctionsCombineSwift",
- "FirebaseStorageCombineSwift",
- "FirebaseCrashlytics",
- "FirebaseCore",
- "FirebaseDatabase",
- "FirebaseDynamicLinks",
- "FirebaseFirestoreTarget",
- "FirebaseFirestoreSwift",
- "FirebaseFunctions",
- "FirebaseInAppMessaging",
- .target(name: "FirebaseInAppMessagingSwift",
- condition: .when(platforms: [.iOS, .tvOS])),
- "FirebaseInstallations",
- "FirebaseMessaging",
- .target(name: "FirebasePerformance",
- condition: .when(platforms: [.iOS, .tvOS])),
- "FirebaseRemoteConfig",
- "FirebaseSessions",
- "FirebaseStorage",
- .product(name: "nanopb", package: "nanopb"),
- ],
- path: "SwiftPMTests/swift-test"
- ),
- .testTarget(
- name: "analytics-import-test",
- dependencies: [
- "FirebaseAnalyticsSwiftTarget",
- "FirebaseAnalyticsWrapper",
- "Firebase",
- ],
- path: "SwiftPMTests/analytics-import-test"
- ),
- .testTarget(
- name: "objc-import-test",
- dependencies: [
- "Firebase",
- "FirebaseAuth",
- "FirebaseABTesting",
- "FirebaseAppCheck",
- .target(name: "FirebaseAppDistribution",
- condition: .when(platforms: [.iOS])),
- "FirebaseCrashlytics",
- "FirebaseCore",
- "FirebaseDatabase",
- "FirebaseDynamicLinks",
- "FirebaseFirestoreTarget",
- "FirebaseFunctions",
- "FirebaseInAppMessaging",
- "FirebaseInstallations",
- "FirebaseMessaging",
- .target(name: "FirebasePerformance",
- condition: .when(platforms: [.iOS, .tvOS])),
- "FirebaseRemoteConfig",
- "FirebaseStorage",
- ],
- path: "SwiftPMTests/objc-import-test"
- ),
- .testTarget(
- name: "version-test",
- dependencies: [
- "FirebaseCore",
- ],
- path: "SwiftPMTests/version-test",
- cSettings: [
- .define("FIR_VERSION", to: firebaseVersion),
- ]
- ),
- // MARK: - Firebase App Check
- .target(name: "FirebaseAppCheck",
- dependencies: [
- "FirebaseCore",
- .product(name: "FBLPromises", package: "Promises"),
- .product(name: "GULEnvironment", package: "GoogleUtilities"),
- ],
- path: "FirebaseAppCheck/Sources",
- publicHeadersPath: "Public",
- cSettings: [
- .headerSearchPath("../.."),
- ],
- linkerSettings: [
- .linkedFramework(
- "DeviceCheck",
- .when(platforms: [.iOS, .macCatalyst, .macOS, .tvOS])
- ),
- ]),
- // Internal headers only for consuming from Swift.
- .target(
- name: "FirebaseAppCheckInterop",
- path: "FirebaseAppCheck/Interop",
- exclude: [
- "CMakeLists.txt",
- ],
- publicHeadersPath: ".",
- cSettings: [
- .headerSearchPath("../../"),
- ]
- ),
- .testTarget(
- name: "AppCheckUnit",
- dependencies: [
- "FirebaseAppCheck",
- "SharedTestUtilities",
- "HeartbeatLoggingTestUtils",
- .product(name: "OCMock", package: "ocmock"),
- ],
- path: "FirebaseAppCheck/Tests",
- exclude: [
- // Disable Swift tests as mixed targets are not supported (Xcode 12.3).
- "Unit/Swift",
- ],
- resources: [
- .process("Fixture"),
- ],
- cSettings: [
- .headerSearchPath("../.."),
- ]
- ),
- .testTarget(
- name: "AppCheckUnitSwift",
- dependencies: ["FirebaseAppCheck"],
- path: "FirebaseAppCheck/Tests/Unit/Swift",
- cSettings: [
- .headerSearchPath("../.."),
- ]
- ),
- .target(
- name: "CxxTest",
- dependencies: [
- .product(name: "abseil", package: "abseil-cpp-SwiftPM"),
- ],
- path: "CxxInterop/Sources/CxxTest",
- cSettings: [
- ]
- ),
- .executableTarget(
- name: "CxxInterop",
- dependencies: ["CxxTest", "FirebaseFirestoreTarget"],
- path: "CxxInterop/Sources/CxxInterop",
- sources: ["main.swift"],
- swiftSettings: [.unsafeFlags([
- "-I", "CxxInterop/Sources/CxxTest",
- "-I", "Firestore/core/src/api",
- "-enable-experimental-cxx-interop",
- ])],
- linkerSettings: [
- .linkedFramework("SystemConfiguration", .when(platforms: [.iOS, .macOS, .tvOS])),
- .linkedFramework("UIKit", .when(platforms: [.iOS, .tvOS])),
- .linkedLibrary("c++"),
- ]
- ),
- // MARK: Testing support
- .target(
- name: "FirebaseFirestoreTestingSupport",
- dependencies: ["FirebaseFirestoreTarget"],
- path: "FirebaseTestingSupport/Firestore/Sources",
- publicHeadersPath: "./",
- cSettings: [
- .headerSearchPath("../../.."),
- .headerSearchPath("../../../Firestore/Source/Public/FirebaseFirestore"),
- ]
- ),
- .testTarget(
- name: "FirestoreTestingSupportTests",
- dependencies: ["FirebaseFirestoreTestingSupport"],
- path: "FirebaseTestingSupport/Firestore/Tests",
- cSettings: [
- .headerSearchPath("../../.."),
- ]
- ),
- ],
- cLanguageStandard: .c99,
- cxxLanguageStandard: CXXLanguageStandard.gnucxx14
- )
- // This is set when running `scripts/check_firestore_symbols.sh`.
- if ProcessInfo.processInfo.environment["FIREBASECI_USE_LOCAL_FIRESTORE_ZIP"] != nil {
- if let firestoreIndex = package.targets
- .firstIndex(where: { $0.name == "FirebaseFirestore" }) {
- package.targets[firestoreIndex] = .binaryTarget(
- name: "FirebaseFirestore",
- // The `xcframework` should be moved to the root of the repo.
- path: "FirebaseFirestore.xcframework"
- )
- }
- }
- // MARK: - Helper Functions
- func googleAppMeasurementDependency() -> Package.Dependency {
- let appMeasurementURL = "https://github.com/google/GoogleAppMeasurement.git"
- // Point SPM CI to the tip of main of https://github.com/google/GoogleAppMeasurement so that the
- // release process can defer publishing the GoogleAppMeasurement tag until after testing.
- if ProcessInfo.processInfo.environment["FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT"] != nil {
- return .package(url: appMeasurementURL, branch: "main")
- }
- return .package(url: appMeasurementURL, exact: "10.10.0")
- }
|