Class: Buildr::AS3::Compiler::AirCompc
- Inherits:
-
Compiler::Base
- Object
- Compiler::Base
- Buildr::AS3::Compiler::AirCompc
- Includes:
- CompilerUtils
- Defined in:
- lib/buildr/as3/compiler.rb
Instance Attribute Summary collapse
-
#project ⇒ Object
readonly
Returns the value of attribute project.
Instance Method Summary collapse
- #compile(sources, target, dependencies) ⇒ Object
-
#initialize(project, options) ⇒ AirCompc
constructor
A new instance of AirCompc.
Methods included from CompilerUtils
#append_args, #get_last_modified, get_output, #is_output_outdated?, #move_dependency_dirs_to_source, #needed?, #older, #reserved_options, #timestamp_from_file
Constructor Details
#initialize(project, options) ⇒ AirCompc
Returns a new instance of AirCompc.
243 244 245 246 |
# File 'lib/buildr/as3/compiler.rb', line 243 def initialize(project, ) super @project = project end |
Instance Attribute Details
#project ⇒ Object (readonly)
Returns the value of attribute project.
241 242 243 |
# File 'lib/buildr/as3/compiler.rb', line 241 def project @project end |
Instance Method Details
#compile(sources, target, dependencies) ⇒ Object
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 |
# File 'lib/buildr/as3/compiler.rb', line 250 def compile(sources, target, dependencies) flex_sdk = [:flexsdk].invoke output = CompilerUtils::get_output(project, target, :swc, ) move_dependency_dirs_to_source( sources, dependencies) cmd_args = [] cmd_args << "-jar" << flex_sdk.compc_jar cmd_args << "-output" << output cmd_args << "-load-config" << flex_sdk.air_config cmd_args << "+flexlib" << "#{flex_sdk.home}/frameworks" cmd_args << "+configname" << "air" sources.each {|source| cmd_args << "-include-sources+=#{source}"} cmd_args << "-library-path+=#{dependencies.join(",")}" unless dependencies.empty? [:debug] = Buildr..debug.to_s .to_hash.reject { |key, value| .include?(key) }. each do |key, value| cmd_args << "-#{key}=#{value}" end flex_sdk..each do |key, value| cmd_args << "-#{key}=#{value}" end unless Buildr.application..dryrun Java::Commands.java cmd_args end end |