| <?xml version="1.0" ?> | |
| <!-- | |
| Licensed to the Apache Software Foundation (ASF) under one or more | |
| contributor license agreements. See the NOTICE file distributed with | |
| this work for additional information regarding copyright ownership. | |
| The ASF licenses this file to You under the Apache License, Version 2.0 | |
| (the "License"); you may not use this file except in compliance with | |
| the License. You may obtain a copy of the License at | |
| http://www.apache.org/licenses/LICENSE-2.0 | |
| Unless required by applicable law or agreed to in writing, software | |
| distributed under the License is distributed on an "AS IS" BASIS, | |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| See the License for the specific language governing permissions and | |
| limitations under the License. | |
| --> | |
| <project default="main" basedir="."> | |
| <property file="${basedir}/env.properties"/> | |
| <property environment="env"/> | |
| <condition property="FLEX_HOME" value="${env.FLEX_HOME}"> | |
| <isset property="env.FLEX_HOME" /> | |
| </condition> | |
| <property name="lib.dir" value="${basedir}/../lib"/> | |
| <!-- additional tasks - mxmlc tag --> | |
| <path id="flexTasks.path"> | |
| <fileset dir="${FLEX_HOME}"> | |
| <include name="lib/flexTasks.jar" /> | |
| <include name="ant/lib/flexTasks.jar" /> | |
| </fileset> | |
| </path> | |
| <taskdef resource="flexTasks.tasks" classpathref="flexTasks.path"/> | |
| <target name="check-flex-home" unless="FLEX_HOME.set" | |
| description="Check that FLEX_HOME is a directory"> | |
| <echo message="FLEX_HOME is ${env.FLEX_HOME}"/> | |
| <condition property="FLEX_HOME.set"> | |
| <and> | |
| <length string="${env.FLEX_HOME}" when="greater" length="0" /> | |
| <available file="${env.FLEX_HOME}" type="dir"/> | |
| </and> | |
| </condition> | |
| <fail message="The environment variable FLEX_HOME must be set to the Flex SDK directory" | |
| unless="FLEX_HOME.set"/> | |
| </target> | |
| <target name="compile"> | |
| <mxmlc file="${basedir}/src/CodeCoveragePreloadSWF.as" static-link-runtime-shared-libraries="true" | |
| output="${lib.dir}/CodeCoveragePreloadSWF.swf" fork="true" failonerror="true"> | |
| <load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/> | |
| <source-path path-element="${basedir}/src"/> | |
| </mxmlc> | |
| </target> | |
| <target name="main" depends="check-flex-home,clean,compile"> | |
| </target> | |
| <target name="clean" description="clean up"> | |
| <delete file="${lib.dir}/CodeCoveragePreloadSWF.swf"/> | |
| </target> | |
| </project> |