Class: Buildr::AS3::Packaging::AirTask
- Inherits:
-
Rake::FileTask
- Object
- Rake::FileTask
- Buildr::AS3::Packaging::AirTask
- Includes:
- Compiler::CompilerUtils, Extension
- Defined in:
- lib/buildr/as3/packaging.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) ⇒ AirTask
constructor
:nodoc:.
- #needed? ⇒ Boolean
- #sign(*args) ⇒ Object
- #with(*args) ⇒ Object
Methods included from Compiler::CompilerUtils
#append_args, #get_last_modified, get_output, #is_output_outdated?, #move_dependency_dirs_to_source, #older, #reserved_options, #timestamp_from_file
Constructor Details
#initialize(*args) ⇒ AirTask
:nodoc:
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/buildr/as3/packaging.rb', line 102 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 << "-package" cmd_args << "-storetype" << storetype cmd_args << "-keystore" << keystore cmd_args << "-storepass" << storepass cmd_args << target_air cmd_args << appdescriptor cmd_args << "-C" << File.dirname(src_swf) << File.basename(src_swf) # puts libs unless libs.nil? 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.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def appdescriptor @appdescriptor end |
#flexsdk ⇒ Object
Returns the value of attribute flexsdk.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def flexsdk @flexsdk end |
#keystore ⇒ Object (readonly)
Returns the value of attribute keystore.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def keystore @keystore end |
#libs ⇒ Object (readonly)
Returns the value of attribute libs.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def libs @libs end |
#src_swf ⇒ Object
Returns the value of attribute src_swf.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def src_swf @src_swf end |
#storepass ⇒ Object (readonly)
Returns the value of attribute storepass.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def storepass @storepass end |
#storetype ⇒ Object (readonly)
Returns the value of attribute storetype.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def storetype @storetype end |
#target_air ⇒ Object
Returns the value of attribute target_air.
100 101 102 |
# File 'lib/buildr/as3/packaging.rb', line 100 def target_air @target_air end |
Instance Method Details
#needed? ⇒ Boolean
129 130 131 |
# File 'lib/buildr/as3/packaging.rb', line 129 def needed? is_output_outdated? target_air, src_swf end |
#sign(*args) ⇒ Object
144 145 146 147 148 149 150 151 152 |
# File 'lib/buildr/as3/packaging.rb', line 144 def sign(*args) args.each do |arg| @storetype = arg[:storetype] if arg.has_key? :storetype @keystore = arg[:keystore] if arg.has_key? :keystore @storepass = arg[:storepass] if arg.has_key? :storepass @appdescriptor = arg[:appdescriptor] if arg.has_key? :appdescriptor end self end |
#with(*args) ⇒ Object
154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/buildr/as3/packaging.rb', line 154 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 |