2019-04-12 19:27:00 -07:00
|
|
|
Pod::Spec.new do |s|
|
|
|
|
|
s.name = 'GoogleDataTransport'
|
2020-12-15 12:35:50 -08:00
|
|
|
s.version = '8.2.0'
|
2019-04-12 19:27:00 -07:00
|
|
|
s.summary = 'Google iOS SDK data transport.'
|
|
|
|
|
|
|
|
|
|
s.description = <<-DESC
|
|
|
|
|
Shared library for iOS SDK data transport needs.
|
|
|
|
|
DESC
|
|
|
|
|
|
|
|
|
|
s.homepage = 'https://developers.google.com/'
|
|
|
|
|
s.license = { :type => 'Apache', :file => 'LICENSE' }
|
|
|
|
|
s.authors = 'Google, Inc.'
|
|
|
|
|
s.source = {
|
|
|
|
|
:git => 'https://github.com/firebase/firebase-ios-sdk.git',
|
2019-07-18 09:54:06 -07:00
|
|
|
:tag => 'DataTransport-' + s.version.to_s
|
2019-04-12 19:27:00 -07:00
|
|
|
}
|
|
|
|
|
|
2020-11-11 12:56:45 -05:00
|
|
|
ios_deployment_target = '9.0'
|
|
|
|
|
osx_deployment_target = '10.12'
|
|
|
|
|
tvos_deployment_target = '10.0'
|
|
|
|
|
watchos_deployment_target = '6.0'
|
|
|
|
|
|
|
|
|
|
s.ios.deployment_target = ios_deployment_target
|
|
|
|
|
s.osx.deployment_target = osx_deployment_target
|
|
|
|
|
s.tvos.deployment_target = tvos_deployment_target
|
|
|
|
|
s.watchos.deployment_target = watchos_deployment_target
|
2019-04-12 19:27:00 -07:00
|
|
|
|
2020-04-09 13:14:15 -07:00
|
|
|
# To develop or run the tests, >= 1.8.0 must be installed.
|
2019-04-12 19:27:00 -07:00
|
|
|
s.cocoapods_version = '>= 1.4.0'
|
|
|
|
|
|
|
|
|
|
s.prefix_header_file = false
|
|
|
|
|
|
2020-06-24 14:09:46 -07:00
|
|
|
s.source_files = ['GoogleDataTransport/GDTCORLibrary/**/*',
|
|
|
|
|
'GoogleDataTransport/GDTCCTLibrary/**/*']
|
2020-07-31 08:12:23 -07:00
|
|
|
s.public_header_files = 'GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/*.h'
|
2020-02-26 16:59:48 -08:00
|
|
|
s.ios.frameworks = 'SystemConfiguration', 'CoreTelephony'
|
|
|
|
|
s.osx.frameworks = 'SystemConfiguration', 'CoreTelephony'
|
|
|
|
|
s.tvos.frameworks = 'SystemConfiguration'
|
2019-04-16 09:56:06 -07:00
|
|
|
|
2020-06-24 14:09:46 -07:00
|
|
|
s.libraries = ['z']
|
|
|
|
|
|
2020-12-11 07:04:34 -08:00
|
|
|
s.dependency 'nanopb', '~> 2.30907.0'
|
2020-06-24 14:09:46 -07:00
|
|
|
|
2019-04-16 09:56:06 -07:00
|
|
|
header_search_paths = {
|
2020-06-24 17:50:15 -07:00
|
|
|
'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/"'
|
2019-04-16 09:56:06 -07:00
|
|
|
}
|
2019-04-12 19:27:00 -07:00
|
|
|
|
|
|
|
|
s.pod_target_xcconfig = {
|
|
|
|
|
'GCC_C_LANGUAGE_STANDARD' => 'c99',
|
2019-11-15 01:30:19 -08:00
|
|
|
'CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY' => 'YES',
|
2020-06-24 14:09:46 -07:00
|
|
|
'GCC_PREPROCESSOR_DEFINITIONS' =>
|
|
|
|
|
# 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 GDTCOR_VERSION=' + s.version.to_s,
|
2019-04-16 09:56:06 -07:00
|
|
|
}.merge(header_search_paths)
|
2019-04-12 19:27:00 -07:00
|
|
|
|
2019-09-09 15:21:29 -07:00
|
|
|
common_test_sources = ['GoogleDataTransport/GDTCORTests/Common/**/*.{h,m}']
|
2019-04-12 19:27:00 -07:00
|
|
|
|
2019-09-10 00:12:26 -07:00
|
|
|
# Test app specs
|
2019-09-13 13:26:31 -07:00
|
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
|
|
|
s.app_spec 'TestApp' do |app_spec|
|
2020-11-11 12:56:45 -05:00
|
|
|
app_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2020-10-05 14:00:49 -04:00
|
|
|
app_spec.source_files = [
|
|
|
|
|
'GoogleDataTransport/GDTTestApp/*.swift',
|
|
|
|
|
'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORRegistrar.h',
|
|
|
|
|
'GoogleDataTransport/GDTCORLibrary/Internal/GDTCORUploader.h',
|
2020-11-24 12:46:50 -05:00
|
|
|
'GoogleDataTransport/GDTCORTests/Common/Categories/GDTCORFlatFileStorage+Testing.h',
|
|
|
|
|
'GoogleDataTransport/GDTCORTests/Unit/Helpers/*.[hm]',
|
2020-10-05 14:00:49 -04:00
|
|
|
'GoogleDataTransport/GDTTestApp/Bridging-Header.h',
|
|
|
|
|
]
|
|
|
|
|
|
2019-09-13 13:26:31 -07:00
|
|
|
app_spec.ios.resources = ['GoogleDataTransport/GDTTestApp/ios/*.storyboard']
|
|
|
|
|
app_spec.macos.resources = ['GoogleDataTransport/GDTTestApp/macos/*.storyboard']
|
|
|
|
|
app_spec.tvos.resources = ['GoogleDataTransport/GDTTestApp/tvos/*.storyboard']
|
|
|
|
|
app_spec.info_plist = {
|
|
|
|
|
'UILaunchStoryboardName' => 'Main',
|
|
|
|
|
'UIMainStoryboardFile' => 'Main',
|
|
|
|
|
'NSMainStoryboardFile' => 'Main'
|
|
|
|
|
}
|
2020-10-05 14:00:49 -04:00
|
|
|
|
|
|
|
|
app_spec.pod_target_xcconfig = {
|
|
|
|
|
'SWIFT_OBJC_BRIDGING_HEADER' => '$(PODS_TARGET_SRCROOT)/GoogleDataTransport/GDTTestApp/Bridging-Header.h'
|
|
|
|
|
}
|
2019-09-13 13:26:31 -07:00
|
|
|
end
|
|
|
|
|
end
|
2019-09-10 00:12:26 -07:00
|
|
|
|
2019-04-12 19:27:00 -07:00
|
|
|
# Unit test specs
|
|
|
|
|
s.test_spec 'Tests-Unit' do |test_spec|
|
2020-12-30 12:50:32 -08:00
|
|
|
test_spec.scheme = { :code_coverage => true }
|
2020-11-11 12:56:45 -05:00
|
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2019-04-12 19:27:00 -07:00
|
|
|
test_spec.requires_app_host = false
|
2019-09-09 15:21:29 -07:00
|
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Unit/**/*.{h,m}'] + common_test_sources
|
2019-04-16 09:56:06 -07:00
|
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
2019-04-12 19:27:00 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
s.test_spec 'Tests-Lifecycle' do |test_spec|
|
2020-12-30 12:50:32 -08:00
|
|
|
test_spec.scheme = { :code_coverage => true }
|
2020-11-11 12:56:45 -05:00
|
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2019-04-12 19:27:00 -07:00
|
|
|
test_spec.requires_app_host = false
|
2019-09-09 15:21:29 -07:00
|
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Lifecycle/**/*.{h,m}'] + common_test_sources
|
2019-04-16 09:56:06 -07:00
|
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
2019-04-12 19:27:00 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Integration test specs
|
|
|
|
|
s.test_spec 'Tests-Integration' do |test_spec|
|
2020-12-30 12:50:32 -08:00
|
|
|
test_spec.scheme = { :code_coverage => true }
|
2020-11-11 12:56:45 -05:00
|
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2019-04-12 19:27:00 -07:00
|
|
|
test_spec.requires_app_host = false
|
2019-09-09 15:21:29 -07:00
|
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Integration/**/*.{h,m}'] + common_test_sources
|
2019-04-16 09:56:06 -07:00
|
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
2019-04-12 19:27:00 -07:00
|
|
|
test_spec.dependency 'GCDWebServer'
|
|
|
|
|
end
|
2019-09-10 00:12:26 -07:00
|
|
|
|
|
|
|
|
# Monkey test specs TODO(mikehaney24): Uncomment when travis is running >= cocoapods-1.8.0
|
2019-09-13 13:26:31 -07:00
|
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
|
|
|
s.test_spec 'Tests-Monkey' do |test_spec|
|
2020-12-30 12:50:32 -08:00
|
|
|
test_spec.scheme = { :code_coverage => true }
|
2020-11-11 12:56:45 -05:00
|
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2019-09-13 13:26:31 -07:00
|
|
|
test_spec.requires_app_host = true
|
|
|
|
|
test_spec.app_host_name = 'GoogleDataTransport/TestApp'
|
|
|
|
|
test_spec.dependency 'GoogleDataTransport/TestApp'
|
2019-10-04 10:05:57 -07:00
|
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Monkey/**/*.{swift}']
|
2019-09-13 13:26:31 -07:00
|
|
|
test_spec.info_plist = {
|
|
|
|
|
'GDT_MONKEYTEST' => '1'
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
end
|
2019-09-10 00:12:26 -07:00
|
|
|
|
2020-06-24 14:09:46 -07:00
|
|
|
# CCT Tests follow
|
|
|
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
|
|
|
s.app_spec 'CCTTestApp' do |app_spec|
|
2020-11-11 12:56:45 -05:00
|
|
|
app_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2020-06-24 14:09:46 -07:00
|
|
|
app_spec.source_files = 'GoogleDataTransport/GDTCCTTestApp/**/*.swift'
|
|
|
|
|
app_spec.ios.resources = ['GoogleDataTransport/GDTCCTTestApp/ios/*.storyboard']
|
|
|
|
|
app_spec.macos.resources = ['GoogleDataTransport/GDTCCTTestApp/macos/*.storyboard']
|
|
|
|
|
app_spec.tvos.resources = ['GoogleDataTransport/GDTCCTTestApp/tvos/*.storyboard']
|
|
|
|
|
app_spec.dependency 'SwiftProtobuf'
|
|
|
|
|
app_spec.info_plist = {
|
|
|
|
|
'UILaunchStoryboardName' => 'Main',
|
|
|
|
|
'UIMainStoryboardFile' => 'Main',
|
|
|
|
|
'NSMainStoryboardFile' => 'Main'
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
2020-07-07 09:10:22 -04:00
|
|
|
common_cct_test_sources = ['GoogleDataTransport/GDTCCTTests/Common/**/*.{h,m}']
|
2020-06-24 14:09:46 -07:00
|
|
|
|
|
|
|
|
# Test specs
|
|
|
|
|
s.test_spec 'CCT-Tests-Unit' do |test_spec|
|
2020-12-30 12:50:32 -08:00
|
|
|
test_spec.scheme = { :code_coverage => true }
|
2020-11-11 12:56:45 -05:00
|
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2020-06-24 14:09:46 -07:00
|
|
|
test_spec.requires_app_host = false
|
2020-07-07 09:10:22 -04:00
|
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Unit/**/*.{h,m}'] + common_cct_test_sources + common_test_sources
|
2020-06-24 14:09:46 -07:00
|
|
|
test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
|
|
|
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
|
|
|
|
test_spec.dependency 'GCDWebServer'
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
s.test_spec 'CCT-Tests-Integration' do |test_spec|
|
2020-12-30 12:50:32 -08:00
|
|
|
test_spec.scheme = { :code_coverage => true }
|
2020-11-11 12:56:45 -05:00
|
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2020-06-24 14:09:46 -07:00
|
|
|
test_spec.requires_app_host = false
|
2020-07-07 09:10:22 -04:00
|
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Integration/**/*.{h,m}'] + common_cct_test_sources
|
2020-06-24 14:09:46 -07:00
|
|
|
test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
|
|
|
|
|
test_spec.pod_target_xcconfig = header_search_paths
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# Monkey test specs, only enabled for development.
|
|
|
|
|
if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
|
|
|
|
|
s.test_spec 'CCT-Tests-Monkey' do |test_spec|
|
2020-12-30 12:50:32 -08:00
|
|
|
test_spec.scheme = { :code_coverage => true }
|
2020-11-11 12:56:45 -05:00
|
|
|
test_spec.platforms = {:ios => ios_deployment_target, :osx => osx_deployment_target, :tvos => tvos_deployment_target}
|
2020-06-24 14:09:46 -07:00
|
|
|
test_spec.requires_app_host = true
|
|
|
|
|
test_spec.app_host_name = 'GoogleDataTransport/CCTTestApp'
|
|
|
|
|
test_spec.dependency 'GoogleDataTransport/CCTTestApp'
|
2020-07-07 09:10:22 -04:00
|
|
|
test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Monkey/**/*.{swift}'] + common_cct_test_sources
|
2020-06-24 14:09:46 -07:00
|
|
|
test_spec.info_plist = {
|
|
|
|
|
'GDT_MONKEYTEST' => '1'
|
|
|
|
|
}
|
|
|
|
|
end
|
|
|
|
|
end
|
2019-04-12 19:27:00 -07:00
|
|
|
end
|