This repository has been archived by the owner on Nov 16, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
51 lines (45 loc) · 2.08 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="hext-core" default="exit" basedir=".">
<description>Hext core, a completing yet alternative standard library for Haxe.</description>
<property environment="env" />
<property name="workspace" location="${env.WORKSPACE}" />
<property name="src" location="${workspace}/src" />
<property name="bin" location="${workspace}/bin" />
<property name="build" location="${workspace}/build" />
<target name="init" description="Creates the directories needed to store output">
<echo>Creating all required directories...</echo>
<mkdir dir="${bin}" />
</target>
<target name="dependencies" depends="init" description="Installs required dependencies">
<echo>Installing required dependencies...</echo>
<exec executable="haxelib">
<arg value="install" />
<arg value="hxcpp" />
</exec>
<exec executable="haxelib">
<arg value="install" />
<arg value="hxcs" />
</exec>
<exec executable="haxelib">
<arg value="install" />
<arg value="hxjava" />
</exec>
</target>
<target name="build" depends="dependencies" description="Builds the unit test runners">
<echo>Building the API documentation...</echo>
<exec executable="haxe" resultproperty="build.code">
<arg value="${build}/build.hxml" />
</exec>
<condition property="build.failed">
<isfailure code="${build.code}" />
</condition>
</target>
<target name="cleanup" depends="build" description="Removes compiled files and directories">
<echo>Removing (temporary) directories...</echo>
<delete dir="${bin}" />
</target>
<target name="exit" depends="cleanup" description="Marks the build as failed if one of the targets failed">
<fail if="build.failed">Build step failed. Check output log for more information.</fail>
<fail if="test.failed">Unit tests step failed. Check output log for more information.</fail>
<echo>Everything went well. Good job!</echo>
</target>
</project>