|
|
@@ -20,6 +20,11 @@ import PackageDescription
|
|
|
|
|
|
let firebaseVersion = "12.3.0"
|
|
|
|
|
|
+// For private preview, Firestore must be built from source.
|
|
|
+let shouldUseSourceFirestore = true
|
|
|
+// Remove the above and uncomment the line below before merging Firestore to main.
|
|
|
+// let shouldUseSourceFirestore = Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil
|
|
|
+
|
|
|
let package = Package(
|
|
|
name: "Firebase",
|
|
|
platforms: [.iOS(.v15), .macCatalyst(.v15), .macOS(.v10_15), .tvOS(.v15), .watchOS(.v7)],
|
|
|
@@ -1400,7 +1405,7 @@ func abseilDependency() -> Package.Dependency {
|
|
|
|
|
|
// If building Firestore from source, abseil will need to be built as source
|
|
|
// as the headers in the binary version of abseil are unusable.
|
|
|
- if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
|
|
|
+ if shouldUseSourceFirestore {
|
|
|
packageInfo = (
|
|
|
"https://github.com/firebase/abseil-cpp-SwiftPM.git",
|
|
|
"0.20240722.0" ..< "0.20240723.0"
|
|
|
@@ -1420,7 +1425,7 @@ func grpcDependency() -> Package.Dependency {
|
|
|
|
|
|
// If building Firestore from source, abseil will need to be built as source
|
|
|
// as the headers in the binary version of abseil are unusable.
|
|
|
- if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
|
|
|
+ if shouldUseSourceFirestore {
|
|
|
packageInfo = ("https://github.com/grpc/grpc-ios.git", "1.69.0" ..< "1.70.0")
|
|
|
} else {
|
|
|
packageInfo = ("https://github.com/google/grpc-binary.git", "1.69.0" ..< "1.70.0")
|
|
|
@@ -1430,7 +1435,7 @@ func grpcDependency() -> Package.Dependency {
|
|
|
}
|
|
|
|
|
|
func firestoreWrapperTarget() -> Target {
|
|
|
- if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
|
|
|
+ if shouldUseSourceFirestore {
|
|
|
return .target(
|
|
|
name: "FirebaseFirestoreTarget",
|
|
|
dependencies: [.target(name: "FirebaseFirestore",
|
|
|
@@ -1449,7 +1454,7 @@ func firestoreWrapperTarget() -> Target {
|
|
|
}
|
|
|
|
|
|
func firestoreTargets() -> [Target] {
|
|
|
- if Context.environment["FIREBASE_SOURCE_FIRESTORE"] != nil {
|
|
|
+ if shouldUseSourceFirestore {
|
|
|
return [
|
|
|
.target(
|
|
|
name: "FirebaseFirestoreInternalWrapper",
|