Class Sprout::ADTTask
In: bundles/as3/lib/sprout/tasks/adt_documentation.rb
bundles/as3/lib/sprout/tasks/adt_task.rb
Parent: ToolTask

The ADT Task provides Rake support for the AIR Developer Tool package command. livedocs.adobe.com/flex/3/html/CommandLineTools_5.html#1035876

The following example can be pasted in a file named ‘rakefile.rb’:

  # Create an ADL task named :run dependent upon the swf that it is using for the window content
  adt :package => 'SomeProject.swf' do |t|
    t.storetype = "PKCS12"
    t.keystore = "cert.p12"
    t.output = "bin/TestProj.air"
    t.application_descriptor = "src/SomeProject-app.xml"
    t.files = [ "assets", "skins" ]
  end

Methods

Public Instance methods

The alias of a key in the keystore. Specifying an alias is not necessary when a keystore only contains a single certificate. If no alias is specified, ADT uses the first key in the keystore.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 11
def alias=(string)
  @alias = string
end

The path to the application descriptor file. The path can be specified relative to the current directory or as an absolute path. (The application descriptor file is renamed as "application.xml" in the AIR file.)

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 70
def application_descriptor=(file)
  @application_descriptor = file
end

The files and directories to package in the AIR file. Any number of files and directories can be specified, delimited by whitespace. If you list a directory, all files and subdirectories within, except hidden files, are added to the package. (In addition, if the application descriptor file is specified, either directly, or through wildcard or directory expansion, it is ignored and not added to the package a second time.) Files and directories specified must be in the current directory or one of its subdirectories. Use the -C option to change the current directory.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 83
def files=(files)
  @files = files
end

[Source]

# File bundles/as3/lib/sprout/tasks/adt_task.rb, line 20
    def initialize_task
      super
      @default_gem_name = 'sprout-flex3sdk-tool'
      @default_gem_path = 'bin/adt'

      # Package command is "adt -package"
      add_param(:package, :boolean) do |p|
        p.description = "Using -package option as default."
        p.value = true
        p.hidden_value = true
      end

      #
      # Signing options
      #
      
      add_param(:alias, :string) do |p|
        p.delimiter = " "
        p.description = "The alias of a key in the keystore. Specifying an alias is not\nnecessary when a keystore only contains a single certificate. If no\nalias is specified, ADT uses the first key in the keystore.\n"
      end
      
      add_param(:storetype, :string) do |p|
        p.delimiter = " "
        p.description = "The type of keystore, determined by the keystore implementation. The\ndefault keystore implementation included with most installations of\nJava supports the JKS and PKCS12 types. Java 5.0 includes support for\nthe PKCS11 type, for accessing keystores on hardware tokens, and\nKeychain type, for accessing the Mac OS-X keychain. Java 6.0 includes\nsupport for the MSCAPI type (on Windows). If other JCA providers have\nbeen installed and configured, additional keystore types might be\navailable. If no keystore type is specified, the default type for the\ndefault JCA provider is used.\n"
      end
      
      add_param(:providerName, :string) do |p|
        p.delimiter = " "
        p.description = "The JCA provider for the specified keystore type. If not specified,\nthen ADT uses the default provider for that type of keystore.\n"
      end      
      
      add_param(:keystore, :file) do |p|
        p.delimiter = " "
        p.description = "The path to the keystore file for file-based store types."
      end
      
      add_param(:storepass, :string) do |p|
        p.delimiter = " "
        p.description = "The password required to access the keystore. If not specified, ADT\nprompts for the password.\n"
      end
      
      add_param(:keypass, :string) do |p|
        p.delimiter = " "
        p.description = "The password required to access the private key that will be used to\nsign the AIR application. If not specified, ADT prompts for the password.\n"
      end
      
      add_param(:tsa, :url) do |p|
        p.delimiter = " "
        p.description = "Specifies the URL of an RFC3161-compliant time stamp server to time\nstamp the digital signature. If no URL is specified, a default time\nstamp server provided by Geotrust is used. When the signature of an AIR\napplication is time stamped, the application can still be installed\nafter the signing certificate expires, because the time stamp verifies\nthat the certificate was valid at the time of signing.\n"
      end
      
      #
      # ADT package options
      #

      add_param(:output, :file) do |p|
        p.hidden_name = true
        p.required = true
        p.description = "The name of the AIR file to be created."
      end
      
      add_param(:application_descriptor, :file) do |p|
        p.hidden_name = true
        p.delimiter = " "
        p.required = true
        p.description = "The path to the application descriptor file. The path can be specified\nrelative to the current directory or as an absolute path. (The\napplication descriptor file is renamed as \"application.xml\" in the AIR\nfile.)\n"
      end

      add_param(:files, :files) do |p|
        # Work-around for shell name not being hidden on files param type
        p.instance_variable_set(:@shell_name, "")        
        p.hidden_name = true
        p.delimiter = ""        
        p.description = "The files and directories to package in the AIR file. Any number of\nfiles and directories can be specified, delimited by whitespace. If you\nlist a directory, all files and subdirectories within, except hidden\nfiles, are added to the package. (In addition, if the application\ndescriptor file is specified, either directly, or through wildcard or\ndirectory expansion, it is ignored and not added to the package a\nsecond time.) Files and directories specified must be in the current\ndirectory or one of its subdirectories. Use the -C option to change the\ncurrent directory.\n"
      end

      def define # :nodoc:
        super

        if(!output)
          self.output = name
        end

        CLEAN.add(output)
      end
            
    end

The password required to access the private key that will be used to sign the AIR application. If not specified, ADT prompts for the password.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 47
def keypass=(string)
  @keypass = string
end

The path to the keystore file for file-based store types.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 35
def keystore=(file)
  @keystore = file
end

The name of the AIR file to be created.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 62
def output=(file)
  @output = file
end

Using -package option as default.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 4
def package=(boolean)
  @package = boolean
end

The JCA provider for the specified keystore type. If not specified, then ADT uses the default provider for that type of keystore.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 30
def providerName=(string)
  @providerName = string
end

The password required to access the keystore. If not specified, ADT prompts for the password.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 41
def storepass=(string)
  @storepass = string
end

The type of keystore, determined by the keystore implementation. The default keystore implementation included with most installations of Java supports the JKS and PKCS12 types. Java 5.0 includes support for the PKCS11 type, for accessing keystores on hardware tokens, and Keychain type, for accessing the Mac OS-X keychain. Java 6.0 includes support for the MSCAPI type (on Windows). If other JCA providers have been installed and configured, additional keystore types might be available. If no keystore type is specified, the default type for the default JCA provider is used.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 24
def storetype=(string)
  @storetype = string
end

Specifies the URL of an RFC3161-compliant time stamp server to time stamp the digital signature. If no URL is specified, a default time stamp server provided by Geotrust is used. When the signature of an AIR application is time stamped, the application can still be installed after the signing certificate expires, because the time stamp verifies that the certificate was valid at the time of signing.

[Source]

# File bundles/as3/lib/sprout/tasks/adt_documentation.rb, line 57
def tsa=(url)
  @tsa = url
end

[Validate]