Class: MTBuild::FrameworkConfiguration
- Inherits:
-
Configuration
- Object
- Configuration
- MTBuild::FrameworkConfiguration
- Defined in:
- lib/mtbuild/framework_configuration.rb
Overview
Use this class to create framework configurations. You won’t typically instantiate this directly. Instead, the FrameworkProject.add_configuration method will create this for you.
Instance Attribute Summary
Attributes inherited from Configuration
#configuration_name, #output_folder, #parent_project, #project_folder
Instance Method Summary collapse
-
#configure_tasks ⇒ Object
Create the actual Rake tasks that will perform the configuration’s work.
-
#initialize(parent_project, output_folder, configuration_name, configuration, api_headers) ⇒ FrameworkConfiguration
constructor
A new instance of FrameworkConfiguration.
Methods included from Rake::DSL
#application_task, #framework_task, #static_library_task, #test_application_task
Constructor Details
#initialize(parent_project, output_folder, configuration_name, configuration, api_headers) ⇒ FrameworkConfiguration
Returns a new instance of FrameworkConfiguration.
9 10 11 12 13 14 15 |
# File 'lib/mtbuild/framework_configuration.rb', line 9 def initialize(parent_project, output_folder, configuration_name, configuration, api_headers) super parent_project, output_folder, configuration_name, configuration check_configuration(configuration) @api_headers = api_headers @configuration_headers = Utils.(configuration.fetch(:configuration_headers, []), @project_folder) @object_files = Utils.(configuration[:objects], [], @project_folder) end |
Instance Method Details
#configure_tasks ⇒ Object
Create the actual Rake tasks that will perform the configuration’s work
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/mtbuild/framework_configuration.rb', line 18 def configure_tasks super desc "Framework '#{@parent_project.project_name}' with configuration '#{@configuration_name}'" new_task = framework_task @configuration_name => @object_files do |t| puts "found framework #{t.name}." end new_task.api_headers = @api_headers new_task.configuration_headers = @configuration_headers new_task.library_files = @object_files end |