Class: Xcake::DefaultProjectStructureGenerator
- Inherits:
-
Generator
show all
- Defined in:
- lib/xcake/generator/default_project_structure_generator.rb
Overview
This class handles generating the default structure
of a project. Making sure that the structure of the
project is one Xcode can open and makes sense.
It will create default configurations or schemes
if none are provided and will make sure both the project
and targets have all of the same configurations.
Instance Attribute Summary
Attributes inherited from Generator
#context
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Generator
#initialize, plugins_location
Methods included from Visitor
#item_name, #leave, #visit
Methods included from Plugin
included
Methods included from Dependency
included
Instance Method Details
#leave_configuration(configuration) ⇒ Object
53
54
|
# File 'lib/xcake/generator/default_project_structure_generator.rb', line 53
def leave_configuration(configuration)
end
|
#leave_project(project) ⇒ Object
21
22
|
# File 'lib/xcake/generator/default_project_structure_generator.rb', line 21
def leave_project(project)
end
|
#leave_target(target) ⇒ Object
47
48
|
# File 'lib/xcake/generator/default_project_structure_generator.rb', line 47
def leave_target(target)
end
|
#visit_configuration(configuration) ⇒ Object
50
51
|
# File 'lib/xcake/generator/default_project_structure_generator.rb', line 50
def visit_configuration(configuration)
end
|
#visit_project(project) ⇒ Object
16
17
18
19
|
# File 'lib/xcake/generator/default_project_structure_generator.rb', line 16
def visit_project(project)
EventHooks.run_hook :before_resolving_project_structure, project
@project = project
end
|
#visit_target(target) ⇒ Object
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/xcake/generator/default_project_structure_generator.rb', line 24
def visit_target(target)
EventHooks.run_hook :before_resolving_target_structure, target
@project.all_configurations.each do |c|
target.configuration(c.name, c.type)
end
native_target = @context.native_object_for(target)
return if native_target.test_target_type?
return unless target.schemes.empty?
target.all_configurations.each do |c|
target.scheme "#{target.name}-#{c.name}" do |s|
s.test_configuration = c.name
s.launch_configuration = c.name
s.profile_configuration = c.name
s.analyze_configuration = c.name
s.archive_configuration = c.name
end
end
end
|