Class: Buildr::AS3::Packaging::AiriTask
- Inherits:
-
Rake::FileTask
- Object
- Rake::FileTask
- Buildr::AS3::Packaging::AiriTask
- Includes:
- Extension
- Defined in:
- lib/buildr/as3/packaging/airi.rb
Instance Attribute Summary collapse
-
#appdescriptor ⇒ Object
readonly
Returns the value of attribute appdescriptor.
-
#flexsdk ⇒ Object
Returns the value of attribute flexsdk.
-
#keystore ⇒ Object
readonly
Returns the value of attribute keystore.
-
#libs ⇒ Object
readonly
Returns the value of attribute libs.
-
#src_swf ⇒ Object
Returns the value of attribute src_swf.
-
#storepass ⇒ Object
readonly
Returns the value of attribute storepass.
-
#storetype ⇒ Object
readonly
Returns the value of attribute storetype.
-
#target_air ⇒ Object
Returns the value of attribute target_air.
Instance Method Summary collapse
-
#initialize(*args) ⇒ AiriTask
constructor
:nodoc:.
- #needed? ⇒ Boolean
- #sign(*args) ⇒ Object
- #with(*args) ⇒ Object
Constructor Details
#initialize(*args) ⇒ AiriTask
:nodoc:
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/buildr/as3/packaging/airi.rb', line 36 def initialize(*args) #:nodoc: super enhance do fail "File not found: #{src_swf}" unless File.exists? src_swf cmd_args = [] cmd_args << "-jar" << flexsdk.adt_jar cmd_args << "-prepare" cmd_args << target_air cmd_args << appdescriptor cmd_args << "-C" << File.dirname(src_swf) << File.basename(src_swf) libs.each do |key, value| puts "key,value", key, value cmd_args << "-C" << key << value end unless libs.nil? puts cmd_args.join " " unless Buildr.application..dryrun Java::Commands.java cmd_args end end end |
Instance Attribute Details
#appdescriptor ⇒ Object (readonly)
Returns the value of attribute appdescriptor.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def appdescriptor @appdescriptor end |
#flexsdk ⇒ Object
Returns the value of attribute flexsdk.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def flexsdk @flexsdk end |
#keystore ⇒ Object (readonly)
Returns the value of attribute keystore.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def keystore @keystore end |
#libs ⇒ Object (readonly)
Returns the value of attribute libs.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def libs @libs end |
#src_swf ⇒ Object
Returns the value of attribute src_swf.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def src_swf @src_swf end |
#storepass ⇒ Object (readonly)
Returns the value of attribute storepass.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def storepass @storepass end |
#storetype ⇒ Object (readonly)
Returns the value of attribute storetype.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def storetype @storetype end |
#target_air ⇒ Object
Returns the value of attribute target_air.
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def target_air @target_air end |
Instance Method Details
#needed? ⇒ Boolean
59 60 61 62 |
# File 'lib/buildr/as3/packaging/airi.rb', line 59 def needed? return true unless File.exists?(target_air) File.stat(src_swf).mtime > File.stat(target_air).mtime end |
#sign(*args) ⇒ Object
75 76 77 78 79 80 |
# File 'lib/buildr/as3/packaging/airi.rb', line 75 def sign(*args) args.each do |arg| @appdescriptor = arg[:appdescriptor] if arg.has_key? :appdescriptor end self end |
#with(*args) ⇒ Object
82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/buildr/as3/packaging/airi.rb', line 82 def with(*args) @libs ||= Hash.new args.each do |arg| case arg when Hash arg.each do |key, value| @libs[key] = value end end end self end |