GoogleDataTransport.podspec 7.5 KB

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