My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?xml version="1.0"?>
<project name="anthx" default="build">

<property name="folder.dist" location="dist"/>
<property name="folder.build" location="build"/>
<property name="folder.build.java" location="${folder.build}/classes"/>

<target name="clean">
<delete dir="${folder.build}"/>
<delete dir="${folder.dist}"/>
</target>

<target name="init">
<mkdir dir="${folder.build}"/>
<mkdir dir="${folder.build}/libs"/>
</target>

<target name="compile-java">
<mkdir dir="${folder.build.java}"/>
<javac srcdir="src-java" destdir="${folder.build.java}" deprecation="true">
<compilerarg value="-Xlint"/>
</javac>
</target>

<target name="package-java">
<copy todir="${folder.build.java}/net/wildwinter/anthx"
file="src-java/net/wildwinter/anthx/anthx.properties"/>
<jar destfile="${folder.build}/libs/AntHX.jar" basedir="${folder.build.java}"/>
<delete dir="${folder.build.java}"/>
</target>

<target name="build" depends="clean,init,compile-java,package-java">
<copy todir="${folder.build}">
<fileset dir="src-hx"/>
</copy>

<copy todir="${folder.build}" file="haxelib.xml"/>

<mkdir dir="${folder.dist}"/>
<zip destfile="${folder.dist}/anthx.zip">
<zipfileset dir="${folder.build}" prefix="anthx"/>
</zip>
</target>

<!-- Very simple tests (for a very simple package) -->
<target name="test" depends="build">

<exec executable="haxelib" dir="${folder.dist}">
<arg line="test anthx.zip"/>
</exec>

<taskdef resource="net/wildwinter/anthx/anthx.properties"
classpath="${folder.build}/libs/AntHX.jar"/>

<!-- haXe environment -->
<!--<haxeEnv
haxePath="E:\devtools\haxe-1.17-win"
nekoPath="E:\devtools\neko-1.6.0-win"/>-->

<!-- haXe embed -->
<haxeEmbed>
<![CDATA[
import neko.Sys;

neko.Lib.println("Hello World!");
neko.Lib.println(Sys.getEnv("TEMP"));
neko.Lib.println('${folder.dist}');

neko.Lib.println(20>10);

setAntProperty("prop1","570");
setAntProperty("prop2","\\=slassfq-g2eqjg42\nTest");
]]>
</haxeEmbed>

<!-- Returned properties -->
<echo>PROP1:${prop1}</echo>
<echo>PROP2:${prop2}</echo>

<!-- haXe compilation -->
<haxe dir="test" main="AppNeko">
<arg line="-neko test.n"/>
</haxe>

<delete file="test/test.n"/>

<haxe dir="test" hxml="test.hxml"/>

<delete file="test/test.n"/>

<!-- haXe2Neko compilation -->
<haxe2neko dir="test" main="AppNeko" out="test.n">
<lib name="anthx"/>
</haxe2neko>

<!-- Neko running -->
<neko file="test/test.n"/>

<delete file="test/test.n"/>

<!-- haXe2SWF -->
<haxe2swf dir="test" main="AppSWF" out="test.swf" version="8">
<header width="200" height="200" framerate="32" background="FFFFAA"/>
</haxe2swf>

<delete file="test/test.swf"/>

<!-- haxe2JS -->
<haxe2js dir="test" main="AppJS" out="test.js"/>

<delete file="test/test.js"/>

<!-- haxe2AS3 -->
<haxe2as3 dir="test" main="AppAS3" out="as3"/>

<delete dir="test/as3"/>

<!--- haxe2PHP -->
<haxe2php dir="test" main="AppPHP" out="php"/>
<delete dir="test/php"/>

<!-- get path of a haxelib library -->
<getHaxelibPath lib="anthx" property="anthx.path"/>
<echo>AntHX path:${anthx.path}</echo>

<!-- Some haxelib actions -->
<haxelib command="info" lib="anthx"/>

</target>

</project>

Change log

r43 by wildwinter on Mar 10, 2009   Diff
v0.6 - corrected problem with neko
NEKOPATH when executing haxeEmbed.
Go to: 

Older revisions

r33 by wildwinter on Jul 28, 2008   Diff
Updated for haXe 2.0

Added haxe2php
r14 by wildwinter on Jul 8, 2008   Diff
Added a whole collection of haxe-
related tasks.
r3 by wildwinter on Jul 7, 2008   Diff
[No log message]
All revisions of this file

File info

Size: 3479 bytes, 131 lines
Powered by Google Project Hosting