-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
71 lines (60 loc) · 2.43 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="build">
<target name="init">
<condition property="git.command" value="git.cmd" else="git">
<os family="windows"/>
</condition>
</target>
<!-- Currently we're copying in the clone of the main project to get access to the API
Need to change that with a better solution. -->
<target name="check-clone-available">
<available file="phototools-clone" type="dir" property="clone.available"/>
</target>
<target name="clone" depends="check-clone-available" unless="clone.available">
<exec executable="${git.command}" dir="${basedir}">
<arg line="clone git://github.com/phototools/phototools.git phototools-clone"/>
</exec>
</target>
<target name="pull" depends="check-clone-available" if="clone.available">
<exec executable="${git.command}" dir="${basedir}/phototools-clone">
<arg line="pull"/>
</exec>
</target>
<target name="copy">
<copy todir="cnf">
<fileset dir="phototools-clone/cnf"/>
</copy>
<copy todir="phototools.api">
<fileset dir="phototools-clone/phototools.api"/>
</copy>
</target>
<target name="__mainiterateinit" unless="__mainiterateinit_done">
<!-- tasks and macros must be defined in a task or we'll get
'Trying to override old definition of task ...' reports -->
<macrodef name="iterate">
<attribute name="target" />
<sequential>
<subant target="@{target}">
<fileset dir="." includes="*/build.xml" excludes="cnf/* phototools-clone/*" />
</subant>
</sequential>
</macrodef>
<!-- mark __mainiterateinit has been run -->
<property name="__mainiterateinit_done" value="set" />
</target>
<target name="build" depends="init, clone, pull, copy, __mainiterateinit">
<iterate target="build" />
<subant target="build.plugin">
<filelist dir="phototools.mtp.plugin" files="build.xml"/>
</subant>
</target>
<target name="junit" depends="__mainiterateinit">
<iterate target="junit" />
</target>
<target name="clean" depends="__mainiterateinit">
<iterate target="clean" />
</target>
<target name="wipecache">
<delete dir="${user.home}/.bnd/cache"/>
</target>
</project>