-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
81 lines (69 loc) · 2.6 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
<?xml version="1.0" encoding="UTF-8"?>
<!--
Sample Ceylon build script using Ant.
-->
<project name="ru.qdzo.ceylon.json2ceylon" default="run">
<!-- Try to determine where Ceylon is installed -->
<condition property="batExt" value=".bat">
<os family="windows" />
</condition>
<property name="batExt" value=""/>
<exec executable="ceylon${batExt}" outputproperty="ceylon.home" failifexecutionfails="false">
<arg value="--show-home" />
</exec>
<property environment="env"/>
<condition property="ceylon.home" value="${env.CEYLON_HOME}" else="/Users/qdzo/.sdkman/candidates/ceylon/1.3.3">
<isset property="env.CEYLON_HOME" />
</condition>
<property name="ceylon.ant.lib" value="${ceylon.home}/lib/ceylon-ant.jar" />
<property name="source.encoding" value="UTF-8"/>
<property name="run.module.name" value="ru.qdzo.ceylon.json2ceylon"/>
<property name="run.module.version" value="0.0.2-SNAPSHOT"/>
<target name="ceylon-ant-taskdefs">
<path id="ant-tasks">
<pathelement location="${ceylon.ant.lib}"/>
</path>
<typedef resource="com/redhat/ceylon/ant/antlib.xml" classpathref="ant-tasks"/>
<moduleset id="plugin.modules">
<module name="${run.module.name}" version="${run.module.version}"/>
</moduleset>
</target>
<target name="default" depends="doc, run">
</target>
<target name="compile" depends="ceylon-ant-taskdefs">
<ceylon-compile encoding="${source.encoding}">
<module name="${run.module.name}"/>
</ceylon-compile>
</target>
<target name="publish" depends="compile">
<ceylon-copy out="${user.home}/.ceylon/repo">
<moduleset refid="plugin.modules"/>
</ceylon-copy>
</target>
<target name="doc" depends="ceylon-ant-taskdefs">
<ceylon-doc encoding="${source.encoding}">
<module name="${run.module.name}"/>
</ceylon-doc>
</target>
<target name="run" depends="compile">
<ceylon-run module="${run.module.name}/${run.module.version}"/>
</target>
<target name="clean">
<delete dir="modules"/>
</target>
<target name="install-plugin" depends="publish">
<echo>Packing plugin</echo>
<exec executable="ceylon">
<arg value="plugin" />
<arg value="pack" />
<arg value="${run.module.name}" />
</exec>
<echo>Install plugin</echo>
<exec executable="ceylon">
<arg value="plugin" />
<arg value="install" />
<arg value="--force" />
<arg value="${run.module.name}" />
</exec>
</target>
</project>