-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
207 lines (181 loc) · 7.5 KB
/
build.xml
File metadata and controls
207 lines (181 loc) · 7.5 KB
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<project name="vimclojure" default="all"
xmlns:ivy="antlib:org.apache.ivy.ant">
<property name="src.dir" location="src"/>
<property name="classes.dir" location="classes"/>
<property name="build.dir" location="build"/>
<property name="lib.dir" location="lib"/>
<property name="jar.file" location="${build.dir}/vimclojure.jar"/>
<property name="srcjar.file" location="${build.dir}/vimclojure-source.jar"/>
<property name="current.version" value="2.1"/>
<property name="ivy.install.version" value="2.1.0-rc1"/>
<property name="ivy.jar.file" value="${lib.dir}/ivy.jar"/>
<property file="local.properties"/>
<target name="init" description="--> create build directories">
<tstamp/>
<mkdir dir="${classes.dir}"/>
<mkdir dir="${build.dir}"/>
<mkdir dir="${lib.dir}"/>
</target>
<condition property="ivy.available">
<available resource="org/apache/ivy/ant/antlib.xml"/>
</condition>
<condition property="ivy.disabled">
<isset property="clojure.jar"/>
</condition>
<condition property="ivy.needed">
<and>
<not><istrue value="${ivy.available}"/></not>
<not><istrue value="${ivy.disabled}"/></not>
</and>
</condition>
<target name="download-ivy" depends="init" if="ivy.needed"
description="--> download Ivy if necessary">
<get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
dest="${ivy.jar.file}"
usetimestamp="true"/>
</target>
<target name="install-ivy" depends="download-ivy" if="ivy.needed"
description="--> install Ivy if necessary">
<path id="ivy.lib.path">
<fileset dir="${lib.dir}" includes="*.jar"/>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml"
uri="antlib:org.apache.ivy.ant"
classpathref="ivy.lib.path"/>
</target>
<target name="resolve" depends="install-ivy,init" unless="ivy.disabled"
description="--> resolve dependencies with Ivy">
<ivy:resolve />
<ivy:retrieve />
</target>
<target name="aot" depends="nailgun-server,resolve,init"
description="--> AOT compile clojure sources">
<java classname="clojure.lang.Compile" failonerror="true">
<classpath>
<path location="${classes.dir}"/>
<path location="${src.dir}"/>
<path location="${clojure.jar}"/>
<path location="${clojure-contrib.jar}"/>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</classpath>
<sysproperty key="clojure.compile.path" value="${classes.dir}"/>
<arg value="de.kotka.vimclojure.gencompletions"/>
<arg value="de.kotka.vimclojure.util"/>
<arg value="de.kotka.vimclojure.repl"/>
<arg value="de.kotka.vimclojure.backend"/>
<arg value="de.kotka.vimclojure.nails"/>
</java>
</target>
<target name="nailgun-server" depends="resolve,init"
description="--> compile the nailgun server">
<javac destdir="${classes.dir}" srcdir="${src.dir}"
includes="org/apache/**/*.java"/>
<javac destdir="${classes.dir}" srcdir="${src.dir}"
includes="com/martiansoftware/**/*.java"/>
<copy todir="${classes.dir}">
<fileset dir="${src.dir}" includes="com/martiansoftware/**"
excludes="com/martiansoftware/**/*.java"/>
</copy>
</target>
<target name="nailgun-client" if="nailgun-client"
description="--> compile the nailgun client using make">
<exec executable="make">
<arg value="${nailgun-client}"/>
</exec>
</target>
<target name="artifacts" depends="aot,nailgun-server"
description="--> create source and artifact jars">
<jar jarfile="${jar.file}">
<path location="README.txt"/>
<path location="LICENSE.txt"/>
<fileset dir="${classes.dir}" includes="de/kotka/**"/>
<fileset dir="${classes.dir}" includes="org/apache/**"/>
<fileset dir="${classes.dir}" includes="com/martiansoftware/**"/>
<fileset dir="${classes.dir}" includes="clojure/proxy/**"/>
<manifest>
<attribute name="Class-Path" value="."/>
</manifest>
</jar>
<jar jarfile="${srcjar.file}">
<path location="README.txt"/>
<path location="LICENSE.txt"/>
<fileset dir="${src.dir}" includes="**/*"/>
</jar>
</target>
<target name="all" depends="artifacts,nailgun-client"
description="--> build the whole project"/>
<target name="clean" description="--> clean generated files">
<delete dir="${classes.dir}"/>
<delete dir="${build.dir}"/>
<delete file="${nailgun-client}"/>
</target>
<target name="clean-lib" description="--> clean library files">
<delete dir="${lib.dir}"/>
</target>
<target name="clean-local" depends="install-ivy" unless="ivy.disabled"
description="--> clean local repository files">
<ivy:info />
<delete dir="${ivy.local.default.root}/${ivy.organisation}/${ivy.module}"/>
</target>
<target name="clean-all" depends="clean-lib,clean"
description="--> clean all project files"/>
<target name="install" if="vimdir"
description="--> install the vim plugin">
<mkdir dir="${vimdir}/autoload"/>
<mkdir dir="${vimdir}/doc"/>
<mkdir dir="${vimdir}/indent"/>
<mkdir dir="${vimdir}/syntax"/>
<mkdir dir="${vimdir}/ftdetect"/>
<mkdir dir="${vimdir}/ftplugin"/>
<mkdir dir="${vimdir}/ftplugin/clojure"/>
<copy todir="${vimdir}/autoload">
<fileset dir="autoload" includes="vimclojure.vim"/>
</copy>
<copy todir="${vimdir}/doc">
<fileset dir="doc" includes="clojure.txt"/>
</copy>
<copy todir="${vimdir}/indent">
<fileset dir="indent" includes="clojure.vim"/>
</copy>
<copy todir="${vimdir}/syntax">
<fileset dir="syntax" includes="clojure.vim"/>
</copy>
<copy todir="${vimdir}/ftdetect">
<fileset dir="ftdetect" includes="clojure.vim"/>
</copy>
<copy todir="${vimdir}/ftplugin">
<fileset dir="ftplugin" includes="clojure.vim"/>
</copy>
<copy todir="${vimdir}/ftplugin/clojure">
<fileset dir="ftplugin/clojure" includes="*.txt"/>
</copy>
</target>
<target name="publish"
description="--> publish artifacts in the shared repository">
<ivy:info />
<ivy:buildnumber
organisation="${ivy.organisation}"
module="${ivy.module}"
revision="${current.version}"/>
<ivy:publish
resolver="shared"
artifactspattern="${build.dir}/[artifact].[ext]"
pubrevision="${ivy.new.revision}"
update="true"
status="release"/>
</target>
<target name="publish-local"
description="--> publish artifacts in the local repository">
<tstamp>
<format property="now" pattern="yyyyMMddHHmmss"/>
</tstamp>
<ivy:info />
<ivy:publish
resolver="local"
artifactspattern="${build.dir}/[artifact].[ext]"
pubrevision="${now}"
pubdate="${now}"
status="integration"
forcedeliver="true"/>
</target>
</project>