GoogleDataTransportCCTSupport.podspec 3.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. Pod::Spec.new do |s|
  2. s.name = 'GoogleDataTransportCCTSupport'
  3. s.version = '1.2.2'
  4. s.summary = 'Support library for the GoogleDataTransport CCT backend target.'
  5. s.description = <<-DESC
  6. Support library to provide event prioritization and uploading for the GoogleDataTransport CCT backend target.
  7. DESC
  8. s.homepage = 'https://developers.google.com/'
  9. s.license = { :type => 'Apache', :file => 'LICENSE' }
  10. s.authors = 'Google, Inc.'
  11. s.source = {
  12. :git => 'https://github.com/firebase/firebase-ios-sdk.git',
  13. :tag => 'DataTransportCCTSupport-' + s.version.to_s
  14. }
  15. s.ios.deployment_target = '8.0'
  16. s.osx.deployment_target = '10.11'
  17. s.tvos.deployment_target = '10.0'
  18. # To develop or run the tests, >= 1.8.0.beta.1 must be installed.
  19. s.cocoapods_version = '>= 1.4.0'
  20. s.static_framework = true
  21. s.prefix_header_file = false
  22. s.source_files = 'GoogleDataTransportCCTSupport/GDTCCTLibrary/**/*'
  23. s.private_header_files = 'GoogleDataTransportCCTSupport/GDTCCTLibrary/Private/*.h'
  24. s.libraries = ['z']
  25. s.dependency 'GoogleDataTransport', '~> 3.2'
  26. s.dependency 'nanopb', '~> 0.3.901'
  27. header_search_paths = {
  28. 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/GoogleDataTransportCCTSupport/"'
  29. }
  30. s.pod_target_xcconfig = {
  31. 'GCC_C_LANGUAGE_STANDARD' => 'c99',
  32. 'GCC_TREAT_WARNINGS_AS_ERRORS' => 'YES',
  33. 'CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY' => 'YES',
  34. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  35. # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
  36. # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
  37. # anyways.)
  38. 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1 GDTCCTSUPPORT_VERSION=' + s.version.to_s,
  39. }.merge(header_search_paths)
  40. # Test app specs
  41. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  42. s.app_spec 'TestApp' do |app_spec|
  43. app_spec.source_files = 'GoogleDataTransportCCTSupport/GDTCCTTestApp/**/*.swift'
  44. app_spec.ios.resources = ['GoogleDataTransportCCTSupport/GDTCCTTestApp/ios/*.storyboard']
  45. app_spec.macos.resources = ['GoogleDataTransportCCTSupport/GDTCCTTestApp/macos/*.storyboard']
  46. app_spec.tvos.resources = ['GoogleDataTransportCCTSupport/GDTCCTTestApp/tvos/*.storyboard']
  47. app_spec.dependency 'SwiftProtobuf'
  48. app_spec.info_plist = {
  49. 'UILaunchStoryboardName' => 'Main',
  50. 'UIMainStoryboardFile' => 'Main',
  51. 'NSMainStoryboardFile' => 'Main'
  52. }
  53. end
  54. end
  55. # Test specs
  56. s.test_spec 'Tests-Unit' do |test_spec|
  57. test_spec.requires_app_host = false
  58. test_spec.source_files = 'GoogleDataTransportCCTSupport/GDTCCTTests/Unit/**/*.{h,m}'
  59. test_spec.resources = ['GoogleDataTransportCCTSupport/GDTCCTTests/Data/**/*']
  60. test_spec.pod_target_xcconfig = header_search_paths
  61. test_spec.dependency 'GCDWebServer'
  62. end
  63. s.test_spec 'Tests-Integration' do |test_spec|
  64. test_spec.requires_app_host = false
  65. test_spec.source_files = 'GoogleDataTransportCCTSupport/GDTCCTTests/Integration/**/*.{h,m}'
  66. test_spec.resources = ['GoogleDataTransportCCTSupport/GDTCCTTests/Data/**/*']
  67. test_spec.pod_target_xcconfig = header_search_paths
  68. end
  69. # Monkey test specs, only enabled for development.
  70. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  71. s.test_spec 'Tests-Monkey' do |test_spec|
  72. test_spec.requires_app_host = true
  73. test_spec.app_host_name = 'GoogleDataTransportCCTSupport/TestApp'
  74. test_spec.dependency 'GoogleDataTransportCCTSupport/TestApp'
  75. test_spec.source_files = ['GoogleDataTransportCCTSupport/GDTCCTTests/Monkey/**/*.{swift}']
  76. test_spec.info_plist = {
  77. 'GDT_MONKEYTEST' => '1'
  78. }
  79. end
  80. end
  81. end