Class: Xcode::Builder::SchemeBuilder

Inherits:
BaseBuilder show all
Defined in:
lib/xcode/builder/scheme_builder.rb

Constant Summary

Constants included from TerminalOutput

TerminalOutput::LEVELS

Instance Attribute Summary

Attributes inherited from BaseBuilder

#build_path, #config, #identity, #keychain, #objroot, #profile, #sdk, #symroot, #target

Instance Method Summary collapse

Methods inherited from BaseBuilder

#app_path, #build, #bundle_identifier, #bundle_version, #clean, #cocoapods_installed?, #configuration_build_path, #dependencies, #deploy, #dsym_path, #dsym_zip_path, #entitlements_path, #has_dependencies?, #ipa_name, #ipa_path, #package, #prepare_build_command, #prepare_clean_command, #prepare_dsym_command, #prepare_package_command, #prepare_test_command, #product_name, #product_version_basename, #project_root, #with_command

Methods included from TerminalOutput

#color_output=, #color_output?, #format_lhs, included, #log_level, log_level=, #print, #print_input, #print_output, #print_system, #print_task, #puts, terminal_supports_colors?

Constructor Details

#initialize(scheme) ⇒ SchemeBuilder

Returns a new instance of SchemeBuilder.



18
19
20
21
22
# File 'lib/xcode/builder/scheme_builder.rb', line 18

def initialize(scheme)
  @scheme     = scheme
  @target     = @scheme.build_targets.last
  super @target, @target.config(@scheme.archive_config)
end

Instance Method Details

#prepare_xcodebuild(sdk = nil) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/xcode/builder/scheme_builder.rb', line 24

def prepare_xcodebuild sdk=nil
  cmd = super sdk
  cmd << @scheme.parent.to_xcodebuild_option
  cmd << "-scheme \"#{@scheme.name}\""
  cmd << "-configuration \"#{@scheme.archive_config}\""
  cmd
end

#testObject

def prepare_test_command sdk=@sdk

cmd = super sdk
cmd << "-scheme \"#{@scheme.name}\""
cmd << "-configuration \"#{@scheme.test_config}\""
cmd

end



39
40
41
42
43
44
45
# File 'lib/xcode/builder/scheme_builder.rb', line 39

def test
  unless @scheme.testable?
    print_task :builder, "Nothing to test", :warning        
  else
    super
  end
end