Class: XcodeBuild::Tasks::BuildTask
- Inherits:
-
Rake::TaskLib
- Object
- Rake::TaskLib
- XcodeBuild::Tasks::BuildTask
- Defined in:
- lib/xcode_build/tasks/build_task.rb
Instance Attribute Summary collapse
-
#arch ⇒ Object
Returns the value of attribute arch.
-
#configuration ⇒ Object
Returns the value of attribute configuration.
-
#formatter ⇒ Object
Returns the value of attribute formatter.
-
#invoke_from_within ⇒ Object
Returns the value of attribute invoke_from_within.
-
#output_to ⇒ Object
Returns the value of attribute output_to.
-
#project_name ⇒ Object
Returns the value of attribute project_name.
-
#reporter ⇒ Object
Returns the value of attribute reporter.
-
#scheme ⇒ Object
Returns the value of attribute scheme.
-
#sdk ⇒ Object
Returns the value of attribute sdk.
-
#target ⇒ Object
Returns the value of attribute target.
-
#workspace ⇒ Object
Returns the value of attribute workspace.
-
#xcconfig ⇒ Object
Returns the value of attribute xcconfig.
Instance Method Summary collapse
- #build_opts ⇒ Object
-
#initialize(namespace = :xcode) {|_self| ... } ⇒ BuildTask
constructor
A new instance of BuildTask.
- #run(task) ⇒ Object
Constructor Details
#initialize(namespace = :xcode) {|_self| ... } ⇒ BuildTask
Returns a new instance of BuildTask.
19 20 21 22 23 24 25 26 |
# File 'lib/xcode_build/tasks/build_task.rb', line 19 def initialize(namespace = :xcode, &block) @namespace = namespace @output_to = STDOUT @invoke_from_within = "." yield self if block_given? define end |
Instance Attribute Details
#arch ⇒ Object
Returns the value of attribute arch.
11 12 13 |
# File 'lib/xcode_build/tasks/build_task.rb', line 11 def arch @arch end |
#configuration ⇒ Object
Returns the value of attribute configuration.
10 11 12 |
# File 'lib/xcode_build/tasks/build_task.rb', line 10 def configuration @configuration end |
#formatter ⇒ Object
Returns the value of attribute formatter.
15 16 17 |
# File 'lib/xcode_build/tasks/build_task.rb', line 15 def formatter @formatter end |
#invoke_from_within ⇒ Object
Returns the value of attribute invoke_from_within.
16 17 18 |
# File 'lib/xcode_build/tasks/build_task.rb', line 16 def invoke_from_within @invoke_from_within end |
#output_to ⇒ Object
Returns the value of attribute output_to.
14 15 16 |
# File 'lib/xcode_build/tasks/build_task.rb', line 14 def output_to @output_to end |
#project_name ⇒ Object
Returns the value of attribute project_name.
6 7 8 |
# File 'lib/xcode_build/tasks/build_task.rb', line 6 def project_name @project_name end |
#reporter ⇒ Object
Returns the value of attribute reporter.
17 18 19 |
# File 'lib/xcode_build/tasks/build_task.rb', line 17 def reporter @reporter end |
#scheme ⇒ Object
Returns the value of attribute scheme.
9 10 11 |
# File 'lib/xcode_build/tasks/build_task.rb', line 9 def scheme @scheme end |
#sdk ⇒ Object
Returns the value of attribute sdk.
12 13 14 |
# File 'lib/xcode_build/tasks/build_task.rb', line 12 def sdk @sdk end |
#target ⇒ Object
Returns the value of attribute target.
7 8 9 |
# File 'lib/xcode_build/tasks/build_task.rb', line 7 def target @target end |
#workspace ⇒ Object
Returns the value of attribute workspace.
8 9 10 |
# File 'lib/xcode_build/tasks/build_task.rb', line 8 def workspace @workspace end |
#xcconfig ⇒ Object
Returns the value of attribute xcconfig.
13 14 15 |
# File 'lib/xcode_build/tasks/build_task.rb', line 13 def xcconfig @xcconfig end |
Instance Method Details
#build_opts ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/xcode_build/tasks/build_task.rb', line 32 def build_opts [].tap do |opts| opts << "-project #{project_name}" if project_name opts << "-target #{target}" if target opts << "-workspace #{workspace}" if workspace opts << "-scheme #{scheme}" if scheme opts << "-configuration #{configuration}" if configuration opts << "-arch #{arch}" if arch opts << "-sdk #{sdk}" if sdk opts << "-xcconfig #{xcconfig}" if xcconfig end end |
#run(task) ⇒ Object
28 29 30 |
# File 'lib/xcode_build/tasks/build_task.rb', line 28 def run(task) Rake::Task["#{@namespace}:#{task}"].invoke end |