Class: XcodeProject::Tasks::BuildTask

Inherits:
XcodeBuild::Tasks::BuildTask
  • Object
show all
Defined in:
lib/xcodeproject/tasks/build_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(project, namespace = nil, &block) ⇒ BuildTask

Returns a new instance of BuildTask



33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# File 'lib/xcodeproject/tasks/build_task.rb', line 33

def initialize (project, namespace = nil, &block)
	namespace ||= project.name
	super(namespace, &block)

	@project_name       = project.bundle_path.basename.to_s
	@invoke_from_within = project.bundle_path.dirname

	@formatter        ||= XcodeBuild::Formatters::ProgressFormatter.new
	@with_build_opts  ||= []
	
	unless @build_to.nil?
		build_tmp_to = Pathname.new(@build_to).join('.tmp')

		@with_build_opts << %{ CONFIGURATION_BUILD_DIR="#{@build_to}" }
		@with_build_opts << %{ CONFIGURATION_TEMP_DIR="#{build_tmp_to}" }
		@with_build_opts << %{ SYMROOT="#{build_tmp_to}" }
	end
end

Instance Attribute Details

#build_toObject

Returns the value of attribute build_to



31
32
33
# File 'lib/xcodeproject/tasks/build_task.rb', line 31

def build_to
  @build_to
end

#with_build_optsObject

Returns the value of attribute with_build_opts



30
31
32
# File 'lib/xcodeproject/tasks/build_task.rb', line 30

def with_build_opts
  @with_build_opts
end