GoogleDataTransport.podspec 6.8 KB

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