Method: Xcode::RakeTask#initialize

Defined in:
lib/xcoder/rake_task.rb

#initialize(name = :xcode) {|_self| ... } ⇒ RakeTask

By default this will generate rake tasks within the ‘xcode’ namespace for all the projects (within the current working directory), all their targets, and all their configs. This will also generate tasks for all of a projects schemes as well.

The task accepts a single parameter. This parameter allows you to change the root namespace that the tasks are generated within.

Additionally a block can be specified to provide additional configuration:

Often you do not want to generate rake tasks for all the projects. So you can specify the names of the projects you do want to have appear.

Examples:


rake xcode:hackbook:hackbook:debug:build   
rake xcode:hackbook:hackbook:debug:clean         
rake xcode:hackbook:hackbook:debug:package       
rake xcode:hackbook:hackbook:debug:test          
rake xcode:hackbook:hackbook:release:build       
rake xcode:hackbook:hackbook:release:clean       
rake xcode:hackbook:hackbook:release:package     
rake xcode:hackbook:hackbook:release:test        

Xcode::RakeTask.new :apple

rake apple:hackbook:hackbook:debug:build
# ...

specifying a directory parameter to search within a different folder


Xcode::RakeTask.new :apple do |xcoder|
  xcoder.directory = "~/dayjobprojects"
end

rake apple:dayjobproject1:moneytarget:debug:build
# ...

specifying projects to filter on by the name of a project


Xcode::RakeTask.new :apple do |xcoder|
  xcoder.directory = "~/dayjobprojects"
  xcoder.projects = "Dayjobproject2"
end

rake apple:dayjobproject2:socialtarget:debug:build
# ...

Yields:

  • (_self)

Yield Parameters:



107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/xcoder/rake_task.rb', line 107

def initialize(name = :xcode)
  
  @name = name
  
  yield self if block_given?
  
  define_all_projects_list_task
  define_project_list_tasks
  define_per_project_scheme_builder_tasks
  define_per_project_config_builder_tasks

end