How do I set compiler arguments for sub-projects/builds?

0 views
Skip to first unread message

michael.prescott

unread,
Mar 10, 2010, 5:05:00 PM3/10/10
to Antennae Discussion
I've got the following directory structure:
FlexProject
-src
--sub
---MyClass.as
---build_MyClass.xml
---build-imports.xml
-test
--sub
---MyClassTest.mxml
---build_MyClassTest.xml
---build-imports.xml
tools
-...
build-imports.xml
build.xml


So, I can build all swfs from the root or I can build just MyClass or
MyClassTest. I need to tell mxmlc to -use-network when building
MyClassTest. Can I set this in the build_MyClassTest.xml, how?

michael.prescott

unread,
Mar 10, 2010, 5:22:07 PM3/10/10
to Antennae Discussion
To answer my own question, override properties by setting them before
the import. So, in the FlexProject/test/sub/build-imports.xml do the
following:
<project name="DistractorContainerTest" default="build">

<!-- In order to use the flex-application target, a flex.lib.path
must be defined -->
<path id="flex.lib.path"/>

<!-- Override settings in the [FlexProject]/tools/build-common-
properties.xml -->
<!-- In our case, we've already got a [FlexProject]/tools/build-
common-properties-override.xml, so the following overrides both
Antennae's and our common properties -->
<property name="flex.mxmlc.options" value="-default-size=1024,600 -
source-path=${project.root.dir}/src -use-network=false" />

<!-- pull in shared information -->
<import file="build-imports.xml" />

<!-- project specific targets, these override the defaults in
build-common-targets.xml -->
<target name="build" depends="init,flex-application"
description="Build the application"/>
<target name="run" depends="build,run-flex-application"
description="Run the application"/>
</project>


On Mar 10, 4:05 pm, "michael.prescott" <michael.presc...@gmail.com>
wrote:

Reply all
Reply to author
Forward
0 new messages