Class: Xcake::UI

Inherits:
Object
  • Object
show all
Defined in:
lib/xcake/ui.rb

Class Method Summary collapse

Class Method Details

.register_ui_hooksObject



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/xcake/ui.rb', line 5

def self.register_ui_hooks
  board = Cork::Board.new

  EventHooks.after_cakefile_init do
    board.notice 'Open Cakefile to edit and run xcake make to get your xcode project'
  end

  EventHooks.before_cakefile_read do
    board.puts_indented '- Reading Cakefile'
  end

  EventHooks.before_creating_xcode_project do
    board.puts_indented '- Creating Project'
  end

  EventHooks.before_creating_target do |target|
    board.puts_indented "- Creating #{target}"
  end

  EventHooks.before_resolving_project_structure do
    board.puts_indented '- Resolving Project'
  end

  EventHooks.before_resolving_target_structure do |target|
    board.puts_indented "- Resolving #{target}"
  end

  EventHooks.before_creating_build_configurations do |configurable|
    board.puts_indented "- Creating build configurations for #{configurable}"
  end

  EventHooks.before_creating_build_configuration do |configuration, configurable|
    board.puts_indented "- Creating build configuration #{configuration.name} for #{configurable}"
  end

  EventHooks.before_attaching_xcconfig do |configuration|
    board.puts_indented "- Attaching XCConfig #{configuration.configuration_file} to build configuration #{configuration.name}" # rubocop:disable Metrics/LineLength
  end

  EventHooks.before_adding_system_library do |target|
    board.puts_indented "- Integrating System Libraries #{target.system_libraries} for #{target}"
  end

  EventHooks.before_adding_system_library do |target|
    board.puts_indented "- Integrating System Libraries #{target.system_libraries} for #{target}"
  end

  EventHooks.before_adding_system_framework do |target|
    board.puts_indented "- Integrating System Frameworks #{target.system_frameworks} for #{target}"
  end

  EventHooks.before_adding_build_rules do |target|
    board.puts_indented "- Creating build rules for #{target}"
  end

  EventHooks.before_adding_build_phases do |target|
    board.puts_indented "- Creating build phases for #{target}"
  end

  EventHooks.before_adding_user_schemes do
    board.puts_indented '- Creating User Schemes'
  end

  EventHooks.before_adding_file do |node|
    board.puts "- Adding #{node.path}"
  end

  EventHooks.before_adding_custom_build_rule do |rule, target|
    board.puts "- Adding \"#{rule}\" to #{target}"
  end

  EventHooks.before_adding_custom_build_phase do |phase, target|
    board.puts "- Adding \"#{phase}\" to #{target}"
  end

  EventHooks.before_adding_embed_watch_app_phase do
    board.puts '- Generating embed watch app phase...'
  end

  EventHooks.before_adding_embed_watch_extension_phase do
    board.puts '- Generating embed watch extension phase...'
  end

  EventHooks.after_project_save do
    board.notice 'Done!'
  end
end