-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
51 lines (46 loc) · 2.36 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<project name="VisualEditorConverterLib" default="main" basedir=".">
<property name="version" value="0.1.0"/>
<property environment="env"/>
<property name="FLEX_HOME" value="${env.FLEX_HOME}" />
<!--Path to Moonshine IDE libs folder where built swc will be copied. If not exists target
copy-bin-to-moonshine won't be fired.-->
<property name="VISUALEDITOR_LIBS_PATH" value="../MockupVisualEditor/libs"/>
<property name="XHTMLCONVERTERCLI_LIBS_PATH" value="../XHTMLConverterCLI/libs"/>
<property name="LIB_UNITTESTS_PATH" value="${basedir}/libTests/libs"/>
<property name="SWC_NAME" value="VisualEditorConverterLib-${version}.swc"/>
<property name="IsDebug" value="false" />
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar"/>
<target name="main" depends="clean-up-bin, build, copy-bin-to-libunittests, copy-bin-to-visualeditor, copy-bin-to-xhtmlconvertercli"/>
<target name="clean-up-bin">
<delete>
<fileset dir="${basedir}/bin">
<include name="*"/>
</fileset>
</delete>
</target>
<!-- Compile library project to SWC -->
<target name="build">
<echo>Building VisualEditorConverterLib swc</echo>
<echo>${SWC_NAME}</echo>
<compc debug="${IsDebug}" output="${basedir}/bin/${SWC_NAME}"
incremental="false">
<load-config filename="${FLEX_HOME}/frameworks/flex-config.xml"/>
<load-config filename="${basedir}/compile-config.xml"/>
<external-library-path file="${FLEX_HOME}/frameworks/libs/framework.swc" append="true"/>
<source-path path-element="${basedir}/src" />
<include-sources dir="${basedir}/src" includes="*"/>
</compc>
</target>
<target name="copy-bin-to-visualeditor" if="VISUALEDITOR_LIBS_PATH">
<echo>Copying ${SWC_NAME} to ${VISUALEDITOR_LIBS_PATH}</echo>
<copy file="${basedir}/bin/${SWC_NAME}" todir="${VISUALEDITOR_LIBS_PATH}" force="true"/>
</target>
<target name="copy-bin-to-xhtmlconvertercli" if="XHTMLCONVERTERCLI_LIBS_PATH">
<echo>Copying ${SWC_NAME} to ${XHTMLCONVERTERCLI_LIBS_PATH}</echo>
<copy file="${basedir}/bin/${SWC_NAME}" todir="${XHTMLCONVERTERCLI_LIBS_PATH}" force="true"/>
</target>
<target name="copy-bin-to-libunittests" if="LIB_UNITTESTS_PATH">
<echo>Copying ${SWC_NAME} to ${XHTMLCONVERTERCLI_LIBS_PATH}</echo>
<copy file="${basedir}/bin/${SWC_NAME}" todir="${LIB_UNITTESTS_PATH}" force="true"/>
</target>
</project>