Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Firestore] Consolidate Firestore and FirestoreSwift (Post-Rollback) #11954

Merged
merged 10 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ jobs:
- 'FirebaseCore/Sources/Public'

# Podspec
- 'FirebaseFirestoreInternal.podspec'
- 'FirebaseFirestore.podspec'
- 'FirebaseFirestoreSwift.podspec'

# CMake
- '**CMakeLists.txt'
Expand Down Expand Up @@ -261,6 +263,7 @@ jobs:
strategy:
matrix:
podspec: [
'FirebaseFirestoreInternal.podspec',
'FirebaseFirestore.podspec',
'FirebaseFirestoreSwift.podspec',
]
Expand Down Expand Up @@ -288,6 +291,7 @@ jobs:
strategy:
matrix:
podspec: [
'FirebaseFirestoreInternal.podspec',
'FirebaseFirestore.podspec',
'FirebaseFirestoreSwift.podspec',
]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ jobs:
run: |
scripts/check_firestore_symbols.sh \
$(pwd) \
"${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestore.xcframework
"${HOME}"/ios_frameworks/Firebase/FirebaseFirestore/FirebaseFirestoreInternal.xcframework

quickstart_framework_inappmessaging:
# Don't run on private repo.
Expand Down
105 changes: 7 additions & 98 deletions FirebaseFirestore.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@ Pod::Spec.new do |s|
s.name = 'FirebaseFirestore'
s.version = '10.17.0'
s.summary = 'Google Cloud Firestore'

s.description = <<-DESC
Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.
DESC

s.homepage = 'https://developers.google.com/'
s.license = { :type => 'Apache-2.0', :file => 'Firestore/LICENSE' }
s.authors = 'Google, Inc.'

s.source = {
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
:tag => 'CocoaPods-' + s.version.to_s
Expand All @@ -25,105 +22,17 @@ Google Cloud Firestore is a NoSQL document database built for automatic scaling,
s.cocoapods_version = '>= 1.4.0'
s.prefix_header_file = false

# Header files that constitute the interface to this module. Only Objective-C
# headers belong here, since FirebaseFirestore is primarily an Objective-C
# framework.
s.public_header_files = 'Firestore/Source/Public/FirebaseFirestore/*.h'
s.public_header_files = 'FirebaseFirestoreInternal/**/*.h'

# source_files contains most of the header and source files for the project.
# This includes files named in `public_header_files`.
#
# Each header in this list must be globally unique, even within customer
# projects. This generally means that only Objective-C Headers with a `FIR`
# or `FST` prefix can be in `source_files`. Non-public C++ headers that have
# no filename prefix must be in `preserve_paths`. See
# https://github.com/firebase/firebase-ios-sdk/issues/4035 for more details.
#
# Note: headers from FirebaseCore can be in this list because while they're
# not globally unique, each copy will be the same. It doesn't matter which
# version wins in the global header map. The benefit of keeping them here is
# that "quick open" by filename in Xcode will continue to work.
s.requires_arc = true
s.source_files = [
'FirebaseCore/Extension/*.h',
'Firestore/Source/Public/FirebaseFirestore/*.h',
'Firestore/Source/**/*.{m,mm}',
'Firestore/Protos/nanopb/**/*.cc',
'Firestore/core/include/**/*.{cc,mm}',
'Firestore/core/src/**/*.{cc,mm}',
'FirebaseAuth/Interop/*.h',
'FirebaseFirestoreInternal/**/*.[mh]',
'Firestore/Swift/Source/**/*.swift',
]

# Internal headers that aren't necessarily globally unique. Most C++ internal
# headers should be here to avoid polluting the global header map with
# unprefixed filenames.
#
# These filenames won't be available in Xcode's "quick open" but the types
# inside these files will be available.
s.preserve_paths = [
'Firestore/Source/API/*.h',
'Firestore/Source/Core/*.h',
'Firestore/Source/Local/*.h',
'Firestore/Source/Remote/*.h',
'Firestore/Source/Util/*.h',
'Firestore/Protos/nanopb/**/*.h',
'Firestore/core/include/**/*.h',
'Firestore/core/src/**/*.h',
'Firestore/third_party/nlohmann_json/json.hpp',
]
s.requires_arc = [
'Firestore/Source/**/*',
'Firestore/core/src/**/*.mm',
]

# Exclude alternate implementations for other platforms. These types depend
# upon link-time substitution, and there's no provision within CocoaPods for
# selecting files dynamically.
s.exclude_files = [
'Firestore/core/src/api/input_validation_std.cc',
'Firestore/core/src/remote/connectivity_monitor_noop.cc',
'Firestore/core/src/util/filesystem_win.cc',
'Firestore/core/src/util/hard_assert_stdio.cc',
'Firestore/core/src/util/log_stdio.cc',
'Firestore/core/src/util/secure_random_openssl.cc'
]

s.dependency 'FirebaseAppCheckInterop', '~> 10.17'
s.dependency 'FirebaseCore', '~> 10.0'
s.dependency 'FirebaseCoreExtension', '~> 10.0'
s.dependency 'FirebaseFirestoreInternal', '~> 10.17'
s.dependency 'FirebaseSharedSwift', '~> 10.0'

abseil_version = '~> 1.20220623.0'
s.dependency 'abseil/algorithm', abseil_version
s.dependency 'abseil/base', abseil_version
s.dependency 'abseil/container/flat_hash_map', abseil_version
s.dependency 'abseil/memory', abseil_version
s.dependency 'abseil/meta', abseil_version
s.dependency 'abseil/strings/strings', abseil_version
s.dependency 'abseil/time', abseil_version
s.dependency 'abseil/types', abseil_version

s.dependency 'gRPC-C++', '~> 1.49.1'
s.dependency 'leveldb-library', '~> 1.22'
s.dependency 'nanopb', '>= 2.30908.0', '< 2.30910.0'

s.ios.frameworks = 'SystemConfiguration', 'UIKit'
s.osx.frameworks = 'SystemConfiguration'
s.tvos.frameworks = 'SystemConfiguration', 'UIKit'

s.library = 'c++'
s.pod_target_xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
'GCC_C_LANGUAGE_STANDARD' => 'c99',
'GCC_PREPROCESSOR_DEFINITIONS' =>
"FIRFirestore_VERSION=#{s.version} " +
# The nanopb pod sets these defs, so we must too. (We *do* require 16bit
# (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
# anyways.)
'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1',
'HEADER_SEARCH_PATHS' =>
'"${PODS_TARGET_SRCROOT}" ' +
'"${PODS_TARGET_SRCROOT}/Firestore/Source/Public/FirebaseFirestore" ' +
'"${PODS_ROOT}/nanopb" ' +
'"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"'
}

s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder -Wno-comma'
end
130 changes: 130 additions & 0 deletions FirebaseFirestoreInternal.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
Pod::Spec.new do |s|
s.name = 'FirebaseFirestoreInternal'
s.version = '10.17.0'
s.summary = 'Google Cloud Firestore'

s.description = <<-DESC
Google Cloud Firestore is a NoSQL document database built for automatic scaling, high performance, and ease of application development.
DESC

s.homepage = 'https://developers.google.com/'
s.license = { :type => 'Apache-2.0', :file => 'Firestore/LICENSE' }
s.authors = 'Google, Inc.'

s.source = {
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
:tag => 'CocoaPods-' + s.version.to_s
}

s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.13'
s.tvos.deployment_target = '12.0'

s.swift_version = '5.3'

s.cocoapods_version = '>= 1.4.0'
s.prefix_header_file = false

# Header files that constitute the interface to this module. Only Objective-C
# headers belong here, since FirebaseFirestore is primarily an Objective-C
# framework.
s.public_header_files = 'Firestore/Source/Public/FirebaseFirestore/*.h'

# source_files contains most of the header and source files for the project.
# This includes files named in `public_header_files`.
#
# Each header in this list must be globally unique, even within customer
# projects. This generally means that only Objective-C Headers with a `FIR`
# or `FST` prefix can be in `source_files`. Non-public C++ headers that have
# no filename prefix must be in `preserve_paths`. See
# https://github.com/firebase/firebase-ios-sdk/issues/4035 for more details.
#
# Note: headers from FirebaseCore can be in this list because while they're
# not globally unique, each copy will be the same. It doesn't matter which
# version wins in the global header map. The benefit of keeping them here is
# that "quick open" by filename in Xcode will continue to work.
s.source_files = [
'FirebaseCore/Extension/*.h',
'Firestore/Source/Public/FirebaseFirestore/*.h',
'Firestore/Source/**/*.{m,mm}',
'Firestore/Protos/nanopb/**/*.cc',
'Firestore/core/include/**/*.{cc,mm}',
'Firestore/core/src/**/*.{cc,mm}',
'FirebaseAuth/Interop/*.h',
]

# Internal headers that aren't necessarily globally unique. Most C++ internal
# headers should be here to avoid polluting the global header map with
# unprefixed filenames.
#
# These filenames won't be available in Xcode's "quick open" but the types
# inside these files will be available.
s.preserve_paths = [
'Firestore/Source/API/*.h',
'Firestore/Source/Core/*.h',
'Firestore/Source/Local/*.h',
'Firestore/Source/Remote/*.h',
'Firestore/Source/Util/*.h',
'Firestore/Protos/nanopb/**/*.h',
'Firestore/core/include/**/*.h',
'Firestore/core/src/**/*.h',
'Firestore/third_party/nlohmann_json/json.hpp',
]
s.requires_arc = [
'Firestore/Source/**/*',
'Firestore/core/src/**/*.mm',
]

# Exclude alternate implementations for other platforms. These types depend
# upon link-time substitution, and there's no provision within CocoaPods for
# selecting files dynamically.
s.exclude_files = [
'Firestore/core/src/api/input_validation_std.cc',
'Firestore/core/src/remote/connectivity_monitor_noop.cc',
'Firestore/core/src/util/filesystem_win.cc',
'Firestore/core/src/util/hard_assert_stdio.cc',
'Firestore/core/src/util/log_stdio.cc',
'Firestore/core/src/util/secure_random_openssl.cc'
]

s.dependency 'FirebaseAppCheckInterop', '~> 10.17'
s.dependency 'FirebaseCore', '~> 10.0'

abseil_version = '~> 1.20220623.0'
s.dependency 'abseil/algorithm', abseil_version
s.dependency 'abseil/base', abseil_version
s.dependency 'abseil/container/flat_hash_map', abseil_version
s.dependency 'abseil/memory', abseil_version
s.dependency 'abseil/meta', abseil_version
s.dependency 'abseil/strings/strings', abseil_version
s.dependency 'abseil/time', abseil_version
s.dependency 'abseil/types', abseil_version

s.dependency 'gRPC-C++', '~> 1.49.1'
s.dependency 'leveldb-library', '~> 1.22'
s.dependency 'nanopb', '>= 2.30908.0', '< 2.30910.0'

s.ios.frameworks = 'SystemConfiguration', 'UIKit'
s.osx.frameworks = 'SystemConfiguration'
s.tvos.frameworks = 'SystemConfiguration', 'UIKit'

s.library = 'c++'
s.pod_target_xcconfig = {
'CLANG_CXX_LANGUAGE_STANDARD' => 'c++14',
'CLANG_CXX_LIBRARY' => 'libc++',
'GCC_C_LANGUAGE_STANDARD' => 'c99',
'GCC_PREPROCESSOR_DEFINITIONS' =>
"FIRFirestore_VERSION=#{s.version} " +
# The nanopb pod sets these defs, so we must too. (We *do* require 16bit
# (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
# anyways.)
'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1',
'HEADER_SEARCH_PATHS' =>
'"${PODS_TARGET_SRCROOT}" ' +
'"${PODS_TARGET_SRCROOT}/Firestore/Source/Public" ' +
'"${PODS_ROOT}/nanopb" ' +
'"${PODS_TARGET_SRCROOT}/Firestore/Protos/nanopb"'
}

s.compiler_flags = '$(inherited) -Wreorder -Werror=reorder -Wno-comma'
end
15 changes: 15 additions & 0 deletions FirebaseFirestoreInternal/FirebaseFirestore/FIRAggregateField.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 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 <FirebaseFirestoreInternal/FIRAggregateField.h>
15 changes: 15 additions & 0 deletions FirebaseFirestoreInternal/FirebaseFirestore/FIRAggregateQuery.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 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 <FirebaseFirestoreInternal/FIRAggregateQuery.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 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 <FirebaseFirestoreInternal/FIRAggregateQuerySnapshot.h>
15 changes: 15 additions & 0 deletions FirebaseFirestoreInternal/FirebaseFirestore/FIRAggregateSource.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 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 <FirebaseFirestoreInternal/FIRAggregateSource.h>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 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 <FirebaseFirestoreInternal/FIRCollectionReference.h>
15 changes: 15 additions & 0 deletions FirebaseFirestoreInternal/FirebaseFirestore/FIRDocumentChange.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Copyright 2023 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 <FirebaseFirestoreInternal/FIRDocumentChange.h>
Loading
Loading