2011-06-27 23:48:35 -07:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!--
|
|
|
|
* Copyright 2011 ZXing authors.
|
|
|
|
*
|
|
|
|
* Licensed 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.
|
|
|
|
-->
|
2011-06-28 23:16:23 -07:00
|
|
|
<project name="ZXing" default="build" basedir="../">
|
2011-06-27 23:48:35 -07:00
|
|
|
<property environment="env" />
|
|
|
|
<property file="${basedir}/build.properties.local" />
|
2011-06-28 23:16:23 -07:00
|
|
|
<property file="${basedir}/../build.properties"/>
|
2011-06-27 23:48:35 -07:00
|
|
|
<property name="FLEX_HOME" location="${env.FLEX_HOME}" />
|
2011-06-28 23:16:23 -07:00
|
|
|
<property name="dist" location="${basedir}/core/bin" />
|
|
|
|
<property name="src" location="${basedir}/core/src" />
|
|
|
|
<property name="test" location="${basedir}/core/test" />
|
|
|
|
<property name="assets" location="${basedir}/../core/test/data" />
|
|
|
|
<property name="libs" location="${basedir}/core/libs" />
|
|
|
|
<property name="output" location="${basedir}/core/bin/output" />
|
|
|
|
<property name="report" location="${basedir}/core/bin/report" />
|
2011-06-27 23:48:35 -07:00
|
|
|
|
|
|
|
<fail unless="FLEX_HOME"
|
|
|
|
message="Error: define FLEX_HOME env. var. with a path to Flex4 SDK" />
|
|
|
|
<fail unless="version"
|
|
|
|
message="Error: version is undefined." />
|
|
|
|
|
|
|
|
<property name="libraryName" value="zxing-${version}.swc" />
|
|
|
|
|
|
|
|
<taskdef resource="flexTasks.tasks"
|
|
|
|
classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />
|
2011-06-28 23:16:23 -07:00
|
|
|
<taskdef resource="flexUnitTasks.tasks"
|
|
|
|
classpath="${libs}/flexUnitTasks-4.1.0-8.jar" />
|
2011-06-27 23:48:35 -07:00
|
|
|
|
|
|
|
<target name="clean">
|
|
|
|
<delete>
|
|
|
|
<fileset dir="${dist}" includes="**/${libraryName}"/>
|
|
|
|
</delete>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="init">
|
|
|
|
<mkdir dir="${dist}"/>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build" depends="init">
|
2011-06-28 23:16:23 -07:00
|
|
|
<fileset id="srcFiles" dir="${src}">
|
2011-06-27 23:48:35 -07:00
|
|
|
<include name="**/*.as"/>
|
|
|
|
</fileset>
|
|
|
|
<pathconvert property="classes" pathsep="," refid="srcFiles">
|
|
|
|
<chainedmapper>
|
2011-06-28 23:16:23 -07:00
|
|
|
<globmapper from="${src}/*" to="*"></globmapper>
|
2011-06-27 23:48:35 -07:00
|
|
|
<mapper type="package" from="*.as" to="*"/>
|
|
|
|
</chainedmapper>
|
|
|
|
</pathconvert>
|
|
|
|
<compc output="${dist}/${libraryName}" include-classes="${classes}">
|
|
|
|
<source-path path-element="${src}"/>
|
2013-04-09 07:02:52 -07:00
|
|
|
<include-sources dir="${basedir}/core/src" includes="*" />
|
2011-06-27 23:48:35 -07:00
|
|
|
</compc>
|
|
|
|
</target>
|
2011-06-28 23:16:23 -07:00
|
|
|
|
|
|
|
<target name="compile.tests" depends="build">
|
|
|
|
<mxmlc file="${test}/com/google/zxing/testrunner/ZXingTestsRunner.mxml"
|
|
|
|
output="${output}/ZXingTestsRunner.swf"
|
|
|
|
debug="true">
|
|
|
|
<library-path dir="${dist}" append="true">
|
|
|
|
<include name="*.swc"/>
|
|
|
|
</library-path>
|
|
|
|
<library-path dir="${libs}" append="true">
|
|
|
|
<include name="*.swc"/>
|
|
|
|
</library-path>
|
|
|
|
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
|
|
|
|
<include name="*.swc"/>
|
|
|
|
</library-path>
|
|
|
|
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
|
|
|
|
<include name="framework.swc"/>
|
|
|
|
</library-path>
|
|
|
|
<source-path path-element="${test}" />
|
|
|
|
<source-path path-element="${assets}" />
|
|
|
|
<compiler.verbose-stacktraces>true</compiler.verbose-stacktraces>
|
|
|
|
<compiler.headless-server>true</compiler.headless-server>
|
|
|
|
</mxmlc>
|
|
|
|
<copy todir="${output}">
|
|
|
|
<fileset dir="${test}/com/google/zxing/testrunner">
|
|
|
|
<include name="zxing*.xml" />
|
|
|
|
</fileset>
|
|
|
|
</copy>
|
|
|
|
</target>
|
|
|
|
|
2011-06-27 23:48:35 -07:00
|
|
|
</project>
|