Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
russellwheatley committed Oct 28, 2024
1 parent b3bdb32 commit 727754d
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import Foundation
import PackageDescription


enum ConfigurationError: Error {
case fileNotFound(String)
case parsingError(String)
Expand Down Expand Up @@ -53,7 +52,7 @@ func loadFirebaseSDKVersion() throws -> String {
}

func loadFirebaseCoreVersion() throws -> String {
let firebaseCorePubspecPath = NSString.path(withComponents: [
let firebaseCorePubspecPath = NSString.path(withComponents: [
firestoreDirectory,
"..",
"..",
Expand All @@ -73,10 +72,10 @@ let firebaseCorePubspecPath = NSString.path(withComponents: [
let libraryVersion = versionLine.split(separator: ":")[1].trimmingCharacters(in: .whitespaces)
.replacingOccurrences(of: "+", with: "-")


return libraryVersion
} catch {
throw ConfigurationError.fileNotFound("Error loading or parsing firebase_core pubspec.yaml: \(error)")
throw ConfigurationError
.fileNotFound("Error loading or parsing firebase_core pubspec.yaml: \(error)")
}
}

Expand All @@ -92,7 +91,6 @@ func loadPubspecVersion() throws -> String {
let libraryVersion = versionLine.split(separator: ":")[1].trimmingCharacters(in: .whitespaces)
.replacingOccurrences(of: "+", with: "-")


return libraryVersion
} catch {
throw ConfigurationError.fileNotFound("Error loading or parsing pubspec.yaml: \(error)")
Expand All @@ -116,7 +114,7 @@ guard let firebase_sdk_version = Version(firebase_sdk_version_string) else {
fatalError("Invalid Firebase SDK version: \(firebase_sdk_version_string)")
}

// TODO - we can try using existing firebase_core tag once flutterfire/Package.swift is part of release cycle
// TODO: - we can try using existing firebase_core tag once flutterfire/Package.swift is part of release cycle
// but I don't think it'll work as Swift versioning requires version-[tag name]
guard let shared_spm_version = Version("\(firebase_core_version_string)\(shared_spm_tag)") else {
fatalError("Invalid firebase_core version: \(firebase_core_version_string)\(shared_spm_tag)")
Expand All @@ -132,15 +130,15 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/firebase/firebase-ios-sdk", from: firebase_sdk_version),
.package(url:"https://github.com/firebase/flutterfire", exact: shared_spm_version),
.package(url: "https://github.com/firebase/flutterfire", exact: shared_spm_version),
],
targets: [
.target(
name: "cloud_firestore",
dependencies: [
.product(name: "FirebaseFirestore", package: "firebase-ios-sdk"),
// Wrapper dependency
.product(name: "firebase-core-shared", package: "flutterfire")
.product(name: "firebase-core-shared", package: "flutterfire"),
],
resources: [
.process("Resources"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#import <FLTFirebasePluginRegistry.h>
#endif


#import "include/cloud_firestore/Private/FLTDocumentSnapshotStreamHandler.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
#import "include/cloud_firestore/Private/FirestorePigeonParser.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
@import FirebaseFirestore;
@import FirebaseCore;

#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreExtension.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreReader.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreWriter.h"

@implementation FLTFirebaseFirestoreReaderWriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
@import FirebaseFirestore;
@import FirebaseCore;

#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreWriter.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
#import "include/cloud_firestore/Public/FLTFirebaseFirestorePlugin.h"

@implementation FLTFirebaseFirestoreWriter : FlutterStandardWriter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@

@import FirebaseFirestore;


#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"
#import "include/cloud_firestore/Private/FLTSnapshotsInSyncStreamHandler.h"
#import "include/cloud_firestore/Private/FLTFirebaseFirestoreUtils.h"

@interface FLTSnapshotsInSyncStreamHandler ()
@property(readwrite, strong) id<FIRListenerRegistration> listenerRegistration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ import 'package:pigeon/pigeon.dart';
),
objcHeaderOut:
'../cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/include/cloud_firestore/Public/FirestoreMessages.g.h',
objcSourceOut: '../cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FirestoreMessages.g.m',
objcSourceOut:
'../cloud_firestore/ios/cloud_firestore/Sources/cloud_firestore/FirestoreMessages.g.m',
cppHeaderOut: '../cloud_firestore/windows/messages.g.h',
cppSourceOut: '../cloud_firestore/windows/messages.g.cpp',
cppOptions: CppOptions(namespace: 'cloud_firestore_windows'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ guard let firebase_sdk_version = Version(firebase_sdk_version_string) else {
fatalError("Invalid Firebase SDK version: \(firebase_sdk_version_string)")
}

// TODO - we can try using existing firebase_core tag once flutterfire/Package.swift is part of release cycle
// TODO: - we can try using existing firebase_core tag once flutterfire/Package.swift is part of release cycle
// but I don't think it'll work as Swift versioning requires version-[tag name]
guard let shared_spm_version = Version("\(library_version_string)\(shared_spm_tag)") else {
fatalError("Invalid firebase_core version: \(library_version_string)\(shared_spm_tag)")
Expand All @@ -104,14 +104,14 @@ let package = Package(
dependencies: [
// No product for firebase-core so we pull in the smallest one
.product(name: "FirebaseInstallations", package: "firebase-ios-sdk"),
.product(name: "firebase-core-shared", package: "flutterfire")
.product(name: "firebase-core-shared", package: "flutterfire"),
],
exclude: [
// These are now pulled in as a remote dependency from FlutterFire repo
"FLTFirebasePlugin.m",
"FLTFirebasePluginRegistry.m",
"include/firebase_core/FLTFirebasePlugin.h",
"include/firebase_core/FLTFirebasePluginRegistry.h"
"include/firebase_core/FLTFirebasePluginRegistry.h",
],
resources: [
.process("Resources"),
Expand Down

0 comments on commit 727754d

Please sign in to comment.