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 |
# 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 # build each dependency of target spec_names = target.specs.map { |spec| [spec.root.name, spec.root.module_name] }.uniq spec_names.map { |root_name, module_name| next if skip_build?(root_name, module_name, sdk) if File.directory?(build_path(target, module_name, sdk)) build_path(target, module_name, sdk) else xcodebuild(root_name, module_name, sdk, deployment_target) end }.compact end |