Podfile 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. workspace 'Masonry'
  2. platform :ios, '8.0'
  3. project 'Examples/Masonry iOS Examples'
  4. target 'Masonry iOS Examples' do
  5. pod 'Masonry', :path => './'
  6. end
  7. target 'Masonry iOS Tests' do
  8. project 'Tests/Masonry Tests'
  9. pod 'Expecta'
  10. end
  11. target 'MasonryTestsLoader' do
  12. project 'Tests/Masonry Tests'
  13. pod 'Masonry', :path => './'
  14. end
  15. # add settings needed to generate test coverage data
  16. post_install do |installer|
  17. COV_TARGET_NAME = "Pods-MasonryTestsLoader"
  18. EXPORT_ENV_PHASE_NAME = "Export Environment Vars"
  19. EXPORT_ENV_PHASE_SCRIPT = "export | egrep '( BUILT_PRODUCTS_DIR)|(CURRENT_ARCH)|(OBJECT_FILE_DIR_normal)|(SRCROOT)|(OBJROOT)' > $SRCROOT/../script/env.sh"
  20. # find target
  21. classy_pods_target = installer.pods_project.targets.find{ |target| target.name == COV_TARGET_NAME }
  22. unless classy_pods_target
  23. raise ::Pod::Informative, "Failed to find '" << COV_TARGET_NAME << "' target"
  24. end
  25. # add build settings
  26. classy_pods_target.build_configurations.each do |config|
  27. config.build_settings['GCC_GENERATE_TEST_COVERAGE_FILES'] = 'YES'
  28. config.build_settings['GCC_INSTRUMENT_PROGRAM_FLOW_ARCS'] = 'YES'
  29. end
  30. # add build phase
  31. phase = classy_pods_target.shell_script_build_phases.select{ |bp| bp.name == EXPORT_ENV_PHASE_NAME }.first ||
  32. classy_pods_target.new_shell_script_build_phase(EXPORT_ENV_PHASE_NAME)
  33. phase.shell_path = "/bin/sh"
  34. phase.shell_script = EXPORT_ENV_PHASE_SCRIPT
  35. phase.show_env_vars_in_log = '0'
  36. end