in scripts/sync_project.rb [62:228]
def sync_firestore(test_only)
project = Xcodeproj::Project.open('Firestore/Example/Firestore.xcodeproj')
spec = Pod::Spec.from_file('FirebaseFirestore.podspec')
swift_spec = Pod::Spec.from_file('FirebaseFirestoreSwift.podspec')
$VERBOSE = true
s = Syncer.new(project, ROOT_DIR)
s.ignore_files = [
'CMakeLists.txt',
'README.md',
'InfoPlist.strings',
'*.orig',
'*.plist',
'.*',
]
s.groups = [
'Tests',
'CoreTests',
'CoreTestsProtos',
'SwiftTests',
]
podspec_settings = [
'CLANG_CXX_LANGUAGE_STANDARD',
'GCC_C_LANGUAGE_STANDARD',
]
xcconfig_spec = spec.attributes_hash['pod_target_xcconfig'].dup
xcconfig_spec.select! { |k, v| podspec_settings.include?(k) }
xcconfig_objc = xcconfig_spec + {
'INFOPLIST_FILE' => '"${SRCROOT}/Tests/Tests-Info.plist"',
'HEADER_SEARCH_PATHS' => [
'"${PODS_ROOT}/../../.."',
'"${PODS_ROOT}/../../../Firestore/Source/Public/FirebaseFirestore"',
'"${PODS_ROOT}/../../../Firestore/Protos/cpp"',
'"${PODS_ROOT}/../../../Firestore/Protos/nanopb"',
'"${PODS_ROOT}/../../../Firestore/third_party/abseil-cpp"',
'"${PODS_ROOT}/GoogleBenchmark/include"',
'"${PODS_ROOT}/GoogleTest/googlemock/include"',
'"${PODS_ROOT}/GoogleTest/googletest/include"',
'"${PODS_ROOT}/leveldb-library/include"',
],
'SYSTEM_HEADER_SEARCH_PATHS' => [
'"${PODS_ROOT}/nanopb"',
'"${PODS_ROOT}/ProtobufCpp/src"',
],
'OTHER_CFLAGS' => [
'-Wno-unreachable-code',
'-Werror'
]
}
xcconfig_swift = {
'SWIFT_OBJC_BRIDGING_HEADER' =>
'${PODS_ROOT}/../../../Firestore/Swift/Tests/BridgingHeader.h',
'SWIFT_VERSION' => pick_swift_version(swift_spec),
}
['iOS', 'macOS', 'tvOS'].each do |platform|
s.target "Firestore_Example_#{platform}" do |t|
t.xcconfig = xcconfig_objc + xcconfig_swift + {
'OTHER_LDFLAGS' => '-all_load',
}
end
s.target "Firestore_Tests_#{platform}" do |t|
t.source_files = [
'Firestore/Example/Tests/**',
'Firestore/core/test/**',
'Firestore/Protos/cpp/**',
]
t.exclude_files = [
'Firestore/Example/Tests/Tests-Info.plist',
'Firestore/Example/Tests/Integration/**',
]
t.xcconfig = xcconfig_objc + xcconfig_swift
end
end
['iOS', 'macOS', 'tvOS'].each do |platform|
s.target "Firestore_IntegrationTests_#{platform}" do |t|
t.source_files = [
'Firestore/Example/Tests/**',
'Firestore/Protos/cpp/**',
'Firestore/Swift/Tests/**',
'Firestore/core/test/**',
]
t.exclude_files = [
'Firestore/Example/Tests/Tests-Info.plist',
]
t.xcconfig = xcconfig_objc + xcconfig_swift
end
s.target 'Firestore_Benchmarks_iOS' do |t|
t.xcconfig = xcconfig_objc + {
'INFOPLIST_FILE' => '${SRCROOT}/Benchmarks/Info.plist',
}
end
s.target 'Firestore_FuzzTests_iOS' do |t|
t.xcconfig = xcconfig_objc + {
'INFOPLIST_FILE' =>
'${SRCROOT}/FuzzTests/Firestore_FuzzTests_iOS-Info.plist',
'OTHER_CFLAGS' => [
'-fsanitize=fuzzer',
]
}
end
end
changes = s.sync(test_only)
if not test_only
sort_project(project)
if project.dirty?
project.save()
end
end
return changes
end