1.5's ant integration - hyphenation usage?

I’m jazzed about the new ant integration and just started looking into
it for an upcoming Flex/AIR project. Unfortunately the Flex ant tasks
and compiler config naming is causing more typing than needed.

I’m having to use the “send” method to workaround Flex’s hyphenation.
Is there a simpler way do do this from the Rakefile?

def amxmlc(app)
ant.mxmlc :file => “${APP_ROOT}/#{app}” do |a|
a.send :‘load-config’, :filename =>
‘${FLEX_HOME}/frameworks/air-config.xml’
a.send :‘source-path’, :‘path-element’ => ‘${FLEX_HOME}/frameworks’
end
end

Jon

COMPLETE RAKEFILE

require ‘ant’

ant.property :environment =>‘env’
ant.property :name => ‘FLEX_HOME’, :value => ‘c:/flex_sdk’
ant.property :name => ‘APP_ROOT’, :value => ‘${basedir}’

ant.taskdef :resource => ‘flexTasks.tasks’,
:classpath => ‘${FLEX_HOME}/ant/lib/flexTasks.jar’

Helpers

def amxmlc(app)
ant.mxmlc :file => “${APP_ROOT}/#{app}” do |a|
a.send :‘load-config’, :filename =>
‘${FLEX_HOME}/frameworks/air-config.xml’
a.send :‘source-path’, :‘path-element’ => ‘${FLEX_HOME}/frameworks’
end
end

Tasks

desc ‘Compile the AIR application’
task :compile do |t|
amxmlc ‘Visualizer.mxml’
end

desc ‘Run the AIR application’
task :run do |t|
sh ‘adl Visualizer-app.xml’
end

task :default => :compile


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email