-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.xml
115 lines (100 loc) · 4.01 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" encoding="UTF-8"?>
<project name="com.vasileff.ceylon.random" default="all">
<property environment="env"/>
<property name="ceylon.home" value="${env.CEYLON_HOME}"/>
<property name="ceylon.ant.lib" value="${ceylon.home}/lib/ceylon-ant.jar"/>
<property name="source.encoding" value="UTF-8"/>
<path id="ant-tasks">
<pathelement location="${ceylon.ant.lib}"/>
</path>
<typedef resource="com/redhat/ceylon/ant/antlib.xml" classpathref="ant-tasks"/>
<!-- directories -->
<property name="out.repo" location="${basedir}/modules"/>
<property name="ceylon.repo.dir" location="${user.home}/.ceylon/repo" />
<moduleset id="modules.jvm">
<module name="com.vasileff.ceylon.random.extras"/>
<module name="com.vasileff.ceylon.random.whole"/>
<module name="com.vasileff.ceylon.random.integer64"/>
<module name="com.vasileff.ceylon.random.java"/>
</moduleset>
<moduleset id="modules.test.jvm">
<module name="test.com.vasileff.ceylon.random"/>
</moduleset>
<moduleset id="modules.js">
<module name="com.vasileff.ceylon.random.extras"/>
<module name="com.vasileff.ceylon.random.whole"/>
<module name="com.vasileff.ceylon.random.integer64"/>
</moduleset>
<moduleset id="modules.test.js">
<module name="test.com.vasileff.ceylon.random"/>
</moduleset>
<target name="all" depends="compile, compile-js, doc"/>
<target name="compile">
<ceylon-compile encoding="${source.encoding}">
<moduleset refid="modules.jvm"/>
<moduleset refid="modules.test.jvm"/>
</ceylon-compile>
</target>
<target name="compile-js">
<ceylon-compile-js encoding="${source.encoding}">
<moduleset refid="modules.js"/>
<moduleset refid="modules.test.js"/>
</ceylon-compile-js>
</target>
<target name="test" depends="compile">
<ceylon-test report="true">
<moduleset refid="modules.test.jvm"/>
</ceylon-test>
</target>
<target name="test-js" depends="compile-js">
<ceylon-test-js report="true">
<moduleset refid="modules.test.js"/>
</ceylon-test-js>
</target>
<target name="doc">
<ceylon-doc
encoding="${source.encoding}"
includesourcecode="true">
<moduleset refid="modules.jvm"/>
</ceylon-doc>
</target>
<target name="publish" depends="all"
description="Copies the SDK modules to the user's repository">
<copy todir="${ceylon.repo.dir}" overwrite="true">
<fileset dir="${out.repo}">
<include name="com/vasileff/ceylon/random/**"/>
<include name="test/com/vasileff/ceylon/random/**"/>
</fileset>
</copy>
</target>
<target name="publish-herd">
<fail message="Please specify a target Herd upload repo url with -Dherd.repo=..." unless="herd.repo"/>
<fail message="Please specify a target Herd user name with -Dherd.user=..." unless="herd.user"/>
<fail message="Please specify a target Herd password with -Dherd.pass=..." unless="herd.pass"/>
<ceylon-compile
encoding="${source.encoding}"
out="${herd.repo}"
user="${herd.user}"
pass="${herd.pass}">
<moduleset refid="modules.jvm"/>
</ceylon-compile>
<ceylon-compile-js
encoding="${source.encoding}"
out="${herd.repo}"
user="${herd.user}"
pass="${herd.pass}">
<moduleset refid="modules.js"/>
</ceylon-compile-js>
<ceylon-doc
encoding="${source.encoding}"
includesourcecode="true"
out="${herd.repo}"
user="${herd.user}"
pass="${herd.pass}">
<moduleset refid="modules.jvm"/>
</ceylon-doc>
</target>
<target name="clean">
<delete dir="modules"/>
</target>
</project>