Class: PodAlexandria::Compiler
- Inherits:
-
Object
- Object
- PodAlexandria::Compiler
- Defined in:
- lib/cocoapods-alexandria/rome/compiler.rb
Instance Attribute Summary collapse
-
#build_dir ⇒ Object
readonly
Returns the value of attribute build_dir.
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
-
#destination ⇒ Object
readonly
Returns the value of attribute destination.
-
#flags ⇒ Object
readonly
Returns the value of attribute flags.
-
#sandbox ⇒ Object
readonly
Returns the value of attribute sandbox.
Instance Method Summary collapse
- #build(target) ⇒ Object
-
#initialize(sandbox, build_dir, destination, configuration, flags) ⇒ Compiler
constructor
A new instance of Compiler.
Constructor Details
#initialize(sandbox, build_dir, destination, configuration, flags) ⇒ Compiler
Returns a new instance of Compiler.
5 6 7 8 9 10 11 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 5 def initialize(sandbox, build_dir, destination, configuration, flags) @sandbox = sandbox @build_dir = build_dir @destination = destination @configuration = configuration @flags = flags end |
Instance Attribute Details
#build_dir ⇒ Object (readonly)
Returns the value of attribute build_dir.
3 4 5 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 3 def build_dir @build_dir end |
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
3 4 5 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 3 def configuration @configuration end |
#destination ⇒ Object (readonly)
Returns the value of attribute destination.
3 4 5 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 3 def destination @destination end |
#flags ⇒ Object (readonly)
Returns the value of attribute flags.
3 4 5 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 3 def flags @flags end |
#sandbox ⇒ Object (readonly)
Returns the value of attribute sandbox.
3 4 5 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 3 def sandbox @sandbox end |
Instance Method Details
#build(target) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/cocoapods-alexandria/rome/compiler.rb', line 13 def build(target) sdk = platform_sdk[target.platform_name] deployment_target = target.platform_deployment_target target_label = target.cocoapods_target_label # find & build all dependencies project.all_dependencies_for(target).map { |target| # skip if already built (product, or by other target) next if skip_build?(target, sdk) # may already be built (by another target) if File.directory?(build_path(target, sdk)) Pod::UI.puts "Already built '#{target.name}'." build_path(target, sdk) else xcodebuild(target, sdk, deployment_target) end }.compact end |