forked from ceylon/ceylon-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
78 lines (67 loc) · 2.93 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
<project name="Ceylon JS compiler" default="test" basedir=".">
<property file="build.properties"/>
<!-- Set build directories for all formats. -->
<property name="build.dir" value="${basedir}/build"/>
<property name="build.classes" location="${build.dir}/classes"/>
<property name="build.dist" location="${build.dir}/dist"/>
<property name="build.lib" location="${build.dir}/lib"/>
<property name="build.test" location="${build.dir}/test"/>
<property name="test.src" location="test"/>
<property name="src" location="src"/>
<property name="runtime" location="runtime"/>
<tstamp/>
<!-- Local repository -->
<property name="ceylon.repo.dir" location="${user.home}/.ceylon/repo"/>
<!-- module archives -->
<property name="ceylon.typechecker.loc" value="${basedir}/../ceylon-spec"/>
<property name="ceylon.typechecker.dir" value="com/redhat/ceylon/typechecker/${module.com.redhat.ceylon.typechecker.version}"/>
<property name="ceylon.typechecker.jar" value="${ceylon.typechecker.dir}/com.redhat.ceylon.typechecker-${module.com.redhat.ceylon.typechecker.version}.jar"/>
<property name="ceylon.typechecker.lib" location="${ceylon.repo.dir}/${ceylon.typechecker.jar}"/>
<!-- Rule to clean everything up -->
<target name="clean" description="Clean up everything">
<delete dir="${build.dir}"/>
</target>
<!-- project compilation -->
<target name="compile" description="compile the js compiler">
<mkdir dir="${build.classes}"/>
<echo message="${ceylon.typechecker.lib}"/>
<javac
srcdir="${src}"
destdir="${build.classes}"
debug="true"
classpath="${ceylon.typechecker.lib}">
<include name="**/*.java"/>
</javac>
</target>
<target name="srctest"
depends="compile"
description="Run generated source comparison tests">
<echo message="Running generated source comparison tests"/>
<java classname="MainForJsTest">
<classpath>
<fileset dir="${ceylon.typechecker.loc}/lib">
<include name="**/*.jar"/>
</fileset>
<pathelement location="${ceylon.typechecker.lib}"/>
<pathelement location="${build.classes}"/>
</classpath>
</java>
</target>
<target name="nodetest"
depends="compile,srctest"
description="Run tests on node.js (requires node)">
<echo message="Running tests on node.js (node must be installed)"/>
<copy todir="${build.test}/node_modules">
<fileset dir="${runtime}">
<include name="**/*.js"/>
</fileset>
</copy>
<copy todir="${build.test}" file="${test.src}/run.js"/>
<exec executable="node">
<arg value="${build.test}/run.js"/>
</exec>
</target>
<target name="test"
depends="srctest,nodetest"
description="Run all tests (requires node)"/>
</project>