GoogleDataTransport.podspec 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. Pod::Spec.new do |s|
  2. s.name = 'GoogleDataTransport'
  3. s.version = '7.5.1'
  4. s.summary = 'Google iOS SDK data transport.'
  5. s.description = <<-DESC
  6. Shared library for iOS SDK data transport needs.
  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 => 'DataTransport-' + 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. s.watchos.deployment_target = '6.0'
  19. # To develop or run the tests, >= 1.8.0 must be installed.
  20. s.cocoapods_version = '>= 1.4.0'
  21. s.static_framework = true
  22. s.prefix_header_file = false
  23. s.source_files = ['GoogleDataTransport/GDTCORLibrary/**/*',
  24. 'GoogleDataTransport/GDTCCTLibrary/**/*']
  25. s.public_header_files = 'GoogleDataTransport/GDTCORLibrary/Public/GoogleDataTransport/*.h'
  26. s.ios.frameworks = 'SystemConfiguration', 'CoreTelephony'
  27. s.osx.frameworks = 'SystemConfiguration', 'CoreTelephony'
  28. s.tvos.frameworks = 'SystemConfiguration'
  29. s.libraries = ['z']
  30. s.dependency 'nanopb', '~> 1.30906.0'
  31. header_search_paths = {
  32. 'HEADER_SEARCH_PATHS' => '"${PODS_TARGET_SRCROOT}/"'
  33. }
  34. s.pod_target_xcconfig = {
  35. 'GCC_C_LANGUAGE_STANDARD' => 'c99',
  36. 'GCC_TREAT_WARNINGS_AS_ERRORS' => 'YES',
  37. 'CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY' => 'YES',
  38. 'GCC_PREPROCESSOR_DEFINITIONS' =>
  39. # The nanopb pod sets these defs, so we must too. (We *do* require 16bit
  40. # (or larger) fields, so we'd have to set at least PB_FIELD_16BIT
  41. # anyways.)
  42. 'PB_FIELD_32BIT=1 PB_NO_PACKED_STRUCTS=1 PB_ENABLE_MALLOC=1 GDTCOR_VERSION=' + s.version.to_s,
  43. }.merge(header_search_paths)
  44. common_test_sources = ['GoogleDataTransport/GDTCORTests/Common/**/*.{h,m}']
  45. # Test app specs
  46. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  47. s.app_spec 'TestApp' do |app_spec|
  48. app_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  49. app_spec.source_files = 'GoogleDataTransport/GDTTestApp/*.swift'
  50. app_spec.ios.resources = ['GoogleDataTransport/GDTTestApp/ios/*.storyboard']
  51. app_spec.macos.resources = ['GoogleDataTransport/GDTTestApp/macos/*.storyboard']
  52. app_spec.tvos.resources = ['GoogleDataTransport/GDTTestApp/tvos/*.storyboard']
  53. app_spec.info_plist = {
  54. 'UILaunchStoryboardName' => 'Main',
  55. 'UIMainStoryboardFile' => 'Main',
  56. 'NSMainStoryboardFile' => 'Main'
  57. }
  58. end
  59. end
  60. # Unit test specs
  61. s.test_spec 'Tests-Unit' do |test_spec|
  62. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  63. test_spec.requires_app_host = false
  64. test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Unit/**/*.{h,m}'] + common_test_sources
  65. test_spec.pod_target_xcconfig = header_search_paths
  66. end
  67. s.test_spec 'Tests-Lifecycle' do |test_spec|
  68. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  69. test_spec.requires_app_host = false
  70. test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Lifecycle/**/*.{h,m}'] + common_test_sources
  71. test_spec.pod_target_xcconfig = header_search_paths
  72. end
  73. # Integration test specs
  74. s.test_spec 'Tests-Integration' do |test_spec|
  75. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  76. test_spec.requires_app_host = false
  77. test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Integration/**/*.{h,m}'] + common_test_sources
  78. test_spec.pod_target_xcconfig = header_search_paths
  79. test_spec.dependency 'GCDWebServer'
  80. end
  81. # Monkey test specs TODO(mikehaney24): Uncomment when travis is running >= cocoapods-1.8.0
  82. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  83. s.test_spec 'Tests-Monkey' do |test_spec|
  84. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  85. test_spec.requires_app_host = true
  86. test_spec.app_host_name = 'GoogleDataTransport/TestApp'
  87. test_spec.dependency 'GoogleDataTransport/TestApp'
  88. test_spec.source_files = ['GoogleDataTransport/GDTCORTests/Monkey/**/*.{swift}']
  89. test_spec.info_plist = {
  90. 'GDT_MONKEYTEST' => '1'
  91. }
  92. end
  93. end
  94. # CCT Tests follow
  95. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  96. s.app_spec 'CCTTestApp' do |app_spec|
  97. app_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  98. app_spec.source_files = 'GoogleDataTransport/GDTCCTTestApp/**/*.swift'
  99. app_spec.ios.resources = ['GoogleDataTransport/GDTCCTTestApp/ios/*.storyboard']
  100. app_spec.macos.resources = ['GoogleDataTransport/GDTCCTTestApp/macos/*.storyboard']
  101. app_spec.tvos.resources = ['GoogleDataTransport/GDTCCTTestApp/tvos/*.storyboard']
  102. app_spec.dependency 'SwiftProtobuf'
  103. app_spec.info_plist = {
  104. 'UILaunchStoryboardName' => 'Main',
  105. 'UIMainStoryboardFile' => 'Main',
  106. 'NSMainStoryboardFile' => 'Main'
  107. }
  108. end
  109. end
  110. common_cct_test_sources = ['GoogleDataTransport/GDTCCTTests/Common/**/*.{h,m}']
  111. # Test specs
  112. s.test_spec 'CCT-Tests-Unit' do |test_spec|
  113. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  114. test_spec.requires_app_host = false
  115. test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Unit/**/*.{h,m}'] + common_cct_test_sources + common_test_sources
  116. test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
  117. test_spec.pod_target_xcconfig = header_search_paths
  118. test_spec.dependency 'GCDWebServer'
  119. end
  120. s.test_spec 'CCT-Tests-Integration' do |test_spec|
  121. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  122. test_spec.requires_app_host = false
  123. test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Integration/**/*.{h,m}'] + common_cct_test_sources
  124. test_spec.resources = ['GoogleDataTransport/GDTCCTTests/Data/**/*']
  125. test_spec.pod_target_xcconfig = header_search_paths
  126. end
  127. # Monkey test specs, only enabled for development.
  128. if ENV['GDT_DEV'] && ENV['GDT_DEV'] == '1' then
  129. s.test_spec 'CCT-Tests-Monkey' do |test_spec|
  130. test_spec.platforms = {:ios => '8.0', :osx => '10.11', :tvos => '10.0'}
  131. test_spec.requires_app_host = true
  132. test_spec.app_host_name = 'GoogleDataTransport/CCTTestApp'
  133. test_spec.dependency 'GoogleDataTransport/CCTTestApp'
  134. test_spec.source_files = ['GoogleDataTransport/GDTCCTTests/Monkey/**/*.{swift}'] + common_cct_test_sources
  135. test_spec.info_plist = {
  136. 'GDT_MONKEYTEST' => '1'
  137. }
  138. end
  139. end
  140. end