Make the building of the ActionScript code optional, depending on whether

flexsdk.dir is provided or can be inferred.

git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@1171 ed5b42cb-e716-0410-a449-f6a68f950b19
This commit is contained in:
Michael Bayne
2011-06-10 16:13:01 +00:00
parent 15c95e618f
commit 1aa6dc7ad4
+17 -4
View File
@@ -27,6 +27,16 @@
</path>
</target>
<target name="-prepare-as" depends="-prepare">
<maventaskdef groupId="com.threerings.ant" artifactId="actionscript" version="1.3"/>
<checkflex/> <!-- if flexsdk.dir is not already set, tries to infer it -->
<if><not><isset property="flexsdk.dir"/></not><then>
<echo>***</echo>
<echo>Not compiling Nenya ActionScript library. Set flexsdk.dir to enable.</echo>
<echo>***</echo>
</then></if>
</target>
<target name="-preptools" depends="-prepare">
<artifact:dependencies pathId="tools.classpath">
<dependency groupId="com.threerings" artifactId="narya-tools" version="1.8"/>
@@ -73,8 +83,8 @@
</instream>
</target>
<target name="aslib" depends="-prepare" description="Builds ActionScript library.">
<maventaskdef groupId="com.threerings.ant" artifactId="actionscript" version="1.0"/>
<target name="aslib" depends="-prepare-as" if="flexsdk.dir"
description="Builds ActionScript library.">
<compc srcdir="${asrc.dir}" libpath="${aslib.path}"
dest="${deploy.dir}/${ant.project.name}lib.swc"/>
</target>
@@ -246,10 +256,13 @@
</java>
</target>
<target name="maven-deploy" depends="dist,aslib"
<target name="-as-maven-deploy" depends="aslib" if="flexsdk.dir">
<mavendeploy file="${deploy.dir}/${ant.project.name}lib.swc" pom="etc/as-pom.xml"/>
</target>
<target name="maven-deploy" depends="dist,-as-maven-deploy"
description="Deploys our build artifacts to a Maven repository.">
<mavendeploy file="${deploy.dir}/${ant.project.name}.jar" srcdir="${src.dir}" pom="pom.xml"/>
<mavendeploy file="${deploy.dir}/${ant.project.name}.jar" pom="etc/tools-pom.xml"/>
<mavendeploy file="${deploy.dir}/${ant.project.name}lib.swc" pom="etc/as-pom.xml"/>
</target>
</project>