-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
99 lines (88 loc) · 4.98 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
<project name="VisualEditor" default="main" basedir=".">
<property name="version" value="0.2.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="MOONSHINE_LIBS_PATH" value="../Moonshine-IDE/ide/MoonshineDESKTOPevolved/libs"/>-->
<property name="SWC_NAME" value="VisualEditor-${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, exclude-files, buildSwc, documentationFlex, documentationPrimeFaces, documentationDomino, clean-up-after-compilation, copy-bin-to-moonshine"/>
<target name="mainBuildWithoutDoc" depends="clean-up-bin, exclude-files, buildSwc, clean-up-after-compilation, copy-bin-to-moonshine"/>
<target name="clean-up-bin">
<delete quiet="true">
<fileset dir="${basedir}/bin">
<include name="*"/>
</fileset>
</delete>
<delete dir="${basedir}/bin/primefaces-doc" />
<delete dir="${basedir}/bin/flex-doc" />
<delete dir="${basedir}/bin/doc" />
</target>
<target name="exclude-files" description="Temporary move files to temp folder which should not be part of swc">
<echo>Start excluding files</echo>
<mkdir dir="${basedir}/temp"/>
<move file="${basedir}/src/VisualEditorApplication-app.xml" todir="${basedir}/temp" failonerror="false"/>
<move file="${basedir}/src/VisualEditorApplication.mxml" todir="${basedir}/temp" failonerror="false"/>
<move file="${basedir}/src/VisualEditorWeb.mxml" todir="${basedir}/temp" failonerror="false"/>
</target>
<target name="clean-up-after-compilation">
<echo>Clean up after build</echo>
<move file="${basedir}/temp/VisualEditorApplication-app.xml" todir="${basedir}/src"/>
<move file="${basedir}/temp/VisualEditorApplication.mxml" todir="${basedir}/src"/>
<move file="${basedir}/temp/VisualEditorWeb.mxml" todir="${basedir}/src"/>
<delete dir="${basedir}/temp"/>
</target>
<!-- Compile library project to SWC -->
<target name="buildSwc">
<echo>Building Visual Editor swc</echo>
<compc debug="${IsDebug}" output="${basedir}/bin/${SWC_NAME}" fork="true"
incremental="true">
<arg value="-load-config=${FLEX_HOME}/frameworks/air-config.xml"/>
<arg value="-load-config+=${basedir}/compile-config.xml"/>
<source-path path-element="${basedir}/src" />
<external-library-path file="${FLEX_HOME}/frameworks/libs/experimental.swc" append="true"/>
<external-library-path file="${FLEX_HOME}/frameworks/libs/spark.swc" append="true"/>
<external-library-path file="${FLEX_HOME}/frameworks/libs/framework.swc" append="true"/>
<external-library-path file="${FLEX_HOME}/frameworks/libs/mx/mx.swc" append="true"/>
<external-library-path file="${FLEX_HOME}/frameworks/libs/apache.swc" append="true"/>
<library-path file="${basedir}/libs/VisualEditorConverterLib-0.1.0.swc" append="true"/>
<include-sources dir="${basedir}/src" includes="*"/>
</compc>
</target>
<target name="documentation">
<echo>Creating documentation for all Visual Editor components</echo>
<asdoc output="${basedir}/bin/doc/all" failonerror="true">
<compiler.external-library-path file="${basedir}/bin/VisualEditor-0.2.0.swc"/>
<doc-sources path-element="${basedir}/src/view/flex/surfaceComponents/components"/>
<doc-sources path-element="${basedir}/src/view/primeFaces/surfaceComponents/components"/>
<doc-sources path-element="${basedir}/src/view/domino/surfaceComponents/components"/>
</asdoc>
</target>
<target name="documentationFlex">
<echo>Creating documentation for Visual Editor Flex components</echo>
<asdoc output="${basedir}/bin/doc/flex" failonerror="true">
<compiler.external-library-path file="${basedir}/bin/VisualEditor-0.2.0.swc"/>
<doc-sources path-element="${basedir}/src/view/flex/surfaceComponents/components"/>
</asdoc>
</target>
<target name="documentationPrimeFaces">
<echo>Creating documentation for Visual Editor PrimeFaces components</echo>
<asdoc output="${basedir}/bin/doc/primefaces" failonerror="true">
<compiler.external-library-path file="${basedir}/bin/VisualEditor-0.2.0.swc"/>
<doc-sources path-element="${basedir}/src/view/primeFaces/surfaceComponents/components"/>
</asdoc>
</target>
<target name="documentationDomino">
<echo>Creating documentation for Domino Visual Editor components</echo>
<asdoc output="${basedir}/bin/doc/domino" failonerror="true">
<compiler.external-library-path file="${basedir}/bin/VisualEditor-0.2.0.swc"/>
<doc-sources path-element="${basedir}/src/view/domino/surfaceComponents/components"/>
</asdoc>
</target>
<target name="copy-bin-to-moonshine" if="MOONSHINE_LIBS_PATH">
<echo>Copying ${SWC_NAME} to ${MOONSHINE_LIBS_PATH}</echo>
<copy file="${basedir}/bin/${SWC_NAME}" todir="${MOONSHINE_LIBS_PATH}" force="true"/>
</target>
</project>