-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
115 lines (107 loc) · 4.52 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version="1.0"?>
<project name="somacore_framework" basedir="." default="2. Run Tests">
<property file="user.properties"/>
<property file="build.properties"/>
<taskdef resource="flexUnitTasks.tasks" classpath="${dir.libs}/flexUnitTasks-4.0.0.jar"/>
<condition property="mxmlc" value="${FLEX_HOME}/bin/mxmlc.exe">
<os family="windows" />
</condition>
<condition property="mxmlc" value="${FLEX_HOME}/bin/mxmlc">
<os name="Mac OS X"/>
</condition>
<condition property="compc" value="${FLEX_HOME}/bin/compc.exe">
<os family="windows" />
</condition>
<condition property="compc" value="${FLEX_HOME}/bin/compc">
<os name="Mac OS X"/>
</condition>
<target name="1. Initialize project directories">
<echo message="Create required project directories"/>
<mkdir dir="bin"/>
<echo message="Success"/>
<eclipse.refreshLocal resource="${project.name}" />
</target>
<target name="2. Run Tests" depends="1. Initialize project directories">
<echo message="Run SomaCore Tests"/>
<exec executable="${mxmlc}">
<arg value="-o"/>
<arg value="${dir.bin}/FlexUnitRunner.swf"/>
<arg value="-library-path"/>
<arg value="${dir.libs}"/>
<arg value="-sp"/>
<arg value="${dir.src.main}"/>
<arg value="-default-size"/>
<arg value="1000"/>
<arg value="600"/>
<arg value="-default-frame-rate"/>
<arg value="40"/>
<arg value="-default-background-color"/>
<arg value="0xFCFCFC"/>
<arg value="-library-path"/>
<arg value="${FLEX_HOME}/frameworks/locale/en_US"/>
<arg value="-library-path"/>
<arg value="${FLEX_HOME}/frameworks/libs"/>
<arg value="-target-player"/>
<arg value="10.0.0"/>
<arg value="-debug=true"/>
<arg value="--"/>
<arg value="${dir.src.test}/FlexUnitRunner.mxml"/>
</exec>
<fdt.extSWFViewer.startSWF file="${dir.bin}/FlexUnitRunner.swf" width="1000" height="600"/>
<echo message="Success"/>
<eclipse.refreshLocal resource="${project.name}" />
</target>
<target name="3. Create Release">
<echo message="Create SomaCore SWC"/>
<exec executable="${compc}">
<arg line="-o"/>
<arg line="'${dir.release}/SomaCore-${somacore.version}.swc'"/>
<arg line="-include-sources"/>
<arg line="'${dir.src.main}'"/>
<arg line="-sp"/>
<arg line="'${dir.src.main}'"/>
<arg line="-include-libraries"/>
<arg line="'${dir.libs}/SwiftSuspenders-v1.6.0.swc'"/>
<!-- not necessary with SwiftSuspenders swc
<arg value="-keep-as3-metadata+=Inject"/>
<arg value="-keep-as3-metadata+=PostConstruct" />
-->
</exec>
<echo message="Success"/>
<eclipse.refreshLocal resource="${project.name}" />
</target>
<target name="4. Create ASDOC">
<echo message="Create SomaCore ASDOC"/>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${dir.docs.asdoc}" defaultexcludes="false">
<include name="**/*"/>
</fileset>
</delete>
<tstamp>
<format property="docgen.time" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
</tstamp>
<java jar="${FLEX_HOME}/lib/asdoc.jar" dir="${FLEX_HOME}/frameworks" fork="true" failonerror="true">
<arg line="-doc-sources ${dir.src.main}"/>
<arg line="-source-path ${dir.src.main}"/>
<arg line="-external-library-path ${dir.libs}"/>
<arg line="-output ${dir.docs.asdoc}"/>
<arg value="-keep-xml=true"/>
<arg value="-lenient=true"/>
<arg line="-window-title 'SomaCore ${somacore.version}'"/>
<arg line="-main-title 'SomaCore ${somacore.version}'"/>
<arg line="-footer 'SomaCore ${somacore.version} | Documentation generated at: ${docgen.time}'"/>
<arg line="-package com.soma.core 'Contains the Soma class (entry point of the framework)'"/>
<arg line="-package com.soma.core.controller 'Contains classes related to commands and events.'"/>
<arg line="-package com.soma.core.di 'Contains classes related to dependency injection.'"/>
<arg line="-package com.soma.core.interfaces 'Contains the interfaces used in the framework.'"/>
<arg line="-package com.soma.core.mediator 'Contains the mediators manager and a Mediator abstract class.'"/>
<arg line="-package com.soma.core.model 'Contains the models manager and a Model abstract class.'"/>
<arg line="-package com.soma.core.ns 'Contains the soma namespace (internal use).'"/>
<arg line="-package com.soma.core.view 'Contains the views manager.'"/>
<arg line="-package com.soma.core.wire 'Contains the wires manager and a Wire abstract class.'"/>
</java>
<echo message="Success"/>
<eclipse.refreshLocal resource="${project.name}" />
<fdt.browse location="${dir.docs.asdoc}/index.html"/>
</target>
</project>