-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
129 lines (107 loc) · 4.45 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<project name="Tako's Ceylon SDK" basedir="." default="test">
<property file="build.properties" />
<property name="ceylon.verbosity" value="false"/>
<property name="ceylon.executable" value="${basedir}/../ceylon-dist/dist/bin/ceylon"/>
<property name="out.repo" location="modules"/>
<property name="test.repo" location="modules"/>
<!-- Local repository -->
<property name="ceylon.repo.dir" location="${user.home}/.ceylon/repo" />
<path id="ant-tasks">
<pathelement location="${ceylon.ant.lib}"/>
</path>
<typedef resource="com/redhat/ceylon/ant/antlib.xml" classpathref="ant-tasks"/>
<reposet id="reposet.compile.test">
<repo url="${out.repo}"/>
</reposet>
<reposet id="reposet.run.test">
<reposet refid="reposet.compile.test"/>
<repo url="${test.repo}"/>
</reposet>
<moduleset id="modules.sdk.jvm">
<module name="org.codejive.ceylon.options"/>
<module name="org.codejive.ceylon.httpd"/>
</moduleset>
<moduleset id="modules.sdk.js">
<module name="org.codejive.ceylon.options"/>
</moduleset>
<moduleset id="modules.test.jvm">
<module name="test.options"/>
</moduleset>
<moduleset id="modules.test.js">
<module name="test.options"/>
</moduleset>
<target name="clean"
description="Deletes the test-modules and modules directories">
<delete dir="${out.repo}"/>
<delete dir="${test.repo}"/>
</target>
<target name="compile-jvm">
<ceylon-compile executable="${ceylon.executable}"
encoding="UTF-8"
verbose="${ceylon.verbosity}">
<moduleset refid="modules.sdk.jvm"/>
</ceylon-compile>
</target>
<target name="compile-js">
<ceylon-compile-js executable="${ceylon.executable}"
encoding="UTF-8"
verbose="${ceylon.verbosity}">
<moduleset refid="modules.sdk.js"/>
</ceylon-compile-js>
</target>
<target name="compile" depends="compile-jvm,compile-js"
description="Compiles the SDK modules to the 'modules' repository" />
<target name="compile-test-jvm" depends="compile-jvm">
<ceylon-compile executable="${ceylon.executable}"
src="test"
out="${test.repo}"
encoding="UTF-8"
verbose="${ceylon.verbosity}">
<reposet refid="reposet.compile.test"/>
<moduleset refid="modules.test.jvm"/>
</ceylon-compile>
</target>
<target name="compile-test-js" depends="compile-js">
<ceylon-compile-js executable="${ceylon.executable}"
src="test"
out="${test.repo}"
encoding="UTF-8"
verbose="${ceylon.verbosity}">
<reposet refid="reposet.compile.test"/>
<moduleset refid="modules.test.js"/>
</ceylon-compile-js>
</target>
<target name="compile-test" depends="compile,compile-test-jvm,compile-test-js"
description="Compiles the test modules to the 'test-modules' repository" />
<target name="test-jvm" depends="compile-test-jvm"
description="Runs the compiled test modules from the 'test-modules' repository">
<ceylon-run
module="test.options/1.3.1"
run="test.options.run"
executable="${ceylon.executable}">
<reposet refid="reposet.run.test"/>
</ceylon-run>
</target>
<target name="test-js" depends="compile-test-js">
<!-- TODO support verbose attr on ceylon-run command -->
<!-- TODO run the js tests -->
</target>
<target name="test" depends="compile-test,test-jvm,test-js"
description="Runs the compiled test modules from the 'test-modules' repository" />
<target name="doc"
description="Documents the SDK modules to the 'modules' repository">
<ceylon-doc executable="${ceylon.executable}">
<moduleset refid="modules.sdk.jvm"/>
</ceylon-doc>
</target>
<target name="publish" depends="compile"
description="Copies the SDK modules to the user's repository">
<copy todir="${ceylon.repo.dir}" overwrite="true">
<fileset dir="${out.repo}">
<include name="ceylon/config/**"/>
<include name="org/codejive/ceylon/options/**"/>
<include name="org/codejive/ceylon/httpd/**"/>
</fileset>
</copy>
</target>
</project>