Repository navigation
Expand file tree
/
Copy pathbuild.xml
More file actions
52 lines (46 loc) · 2.08 KB
/
Copy pathbuild.xml
File metadata and controls
52 lines (46 loc) · 2.08 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
<?xml version="1.0" encoding="UTF-8"?>
<project default="xar" name="consular-cards">
<xmlproperty file="build.properties.xml" semanticAttributes="true" keepRoot="false"/>
<property name="build.dir" value="build"/>
<target name="clean">
<echo message="Deleting xar files..."/>
<delete dir="${build.dir}"/>
</target>
<target name="prepare">
<echo message="Creating build folder..."/>
<mkdir dir="${build.dir}"/>
</target>
<target name="copy">
<echo message="Copying the files to the build folder..."/>
<copy todir="${build.dir}/${app.name}-${app.version}">
<fileset dir="${basedir}">
<exclude name="${build.dir}/**"/>
</fileset>
</copy>
</target>
<target name="apply-filters-to-expath-pkg">
<echo message="Apply values to expath-pkg.xml..."/>
<copy todir="${build.dir}/${app.name}-${app.version}" overwrite="true" verbose="true">
<fileset file="expath-pkg.xml.tmpl"/>
<filterset>
<filter token="name" value="${app.name}"/>
<filter token="version" value="${app.version}"/>
<filter token="url" value="${app.url}"/>
<filter token="title" value="${app.title}"/>
</filterset>
<globmapper from="*.tmpl" to="*"/>
</copy>
</target>
<target name="xar" depends="clean,prepare" description="create xar file">
<antcall target="copy"/>
<antcall target="apply-filters-to-expath-pkg"/>
<echo message="------------------------------------------------------------"/>
<echo message="Creating xar file..."/>
<echo message="------------------------------------------------------------"/>
<zip basedir="${build.dir}/${app.name}-${app.version}" destfile="${build.dir}/${app.name}-${app.version}.xar">
<exclude name="${build.dir}/**"/>
<exclude name="**/*.tmpl"/>
</zip>
<delete dir="${build.dir}/${app.name}-${app.version}"/>
</target>
</project>