-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
72 lines (63 loc) · 2.53 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="com.vasileff.jl4c.guava" 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" />
<!-- modules -->
<moduleset id="modules.jvm">
<module name="com.vasileff.jl4c.guava"/>
</moduleset>
<target name="all" depends="compile, doc"/>
<target name="compile">
<ceylon-compile encoding="${source.encoding}" out="${out.repo}">
<moduleset refid="modules.jvm"/>
</ceylon-compile>
</target>
<target name="doc">
<ceylon-doc
encoding="${source.encoding}"
includesourcecode="true"
out="${out.repo}">
<moduleset refid="modules.jvm"/>
</ceylon-doc>
</target>
<target name="publish" depends="compile, doc"
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/jl4c/guava/**"/>
</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-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>