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)
-
- (Object) appdescriptor
readonly
Returns the value of attribute appdescriptor.
-
- (Object) flexsdk
Returns the value of attribute flexsdk.
-
- (Object) keystore
readonly
Returns the value of attribute keystore.
-
- (Object) libs
readonly
Returns the value of attribute libs.
-
- (Object) src_swf
Returns the value of attribute src_swf.
-
- (Object) storepass
readonly
Returns the value of attribute storepass.
-
- (Object) storetype
readonly
Returns the value of attribute storetype.
-
- (Object) target_air
Returns the value of attribute target_air.
Instance Method Summary (collapse)
-
- (AiriTask) initialize(*args)
constructor
:nodoc:.
- - (Boolean) needed?
- - (Object) sign(*args)
- - (Object) with(*args)
Constructor Details
- (AiriTask) initialize(*args)
: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
- (Object) appdescriptor (readonly)
Returns the value of attribute appdescriptor
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def appdescriptor @appdescriptor end |
- (Object) flexsdk
Returns the value of attribute flexsdk
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def flexsdk @flexsdk end |
- (Object) keystore (readonly)
Returns the value of attribute keystore
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def keystore @keystore end |
- (Object) libs (readonly)
Returns the value of attribute libs
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def libs @libs end |
- (Object) src_swf
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 |
- (Object) storepass (readonly)
Returns the value of attribute storepass
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def storepass @storepass end |
- (Object) storetype (readonly)
Returns the value of attribute storetype
34 35 36 |
# File 'lib/buildr/as3/packaging/airi.rb', line 34 def storetype @storetype end |
- (Object) target_air
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
- (Boolean) needed?
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 |
- (Object) sign(*args)
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 |
- (Object) with(*args)
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 |