forked from navaneeth/calabash-ios-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
75 lines (63 loc) · 3.03 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
<project name="calabash-ios-java">
<tstamp>
<format property="current.date" pattern="yyyyMMdd" />
</tstamp>
<property name="version" value="1.1.3" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="jar.file" value="${jar.dir}/${ant.project.name}-${version}.jar" />
<property name="doc.dir" value="${build.dir}/javadoc" />
<property name="doc.jar" value="${jar.dir}/${ant.project.name}-${version}-javadoc.jar" />
<property name="distro.dir" value="${build.dir}/${ant.project.name}-${version}" />
<property name="distro.file" value="${build.dir}/${ant.project.name}-${version}.zip" />
<property name="deps.dir" value="deps" />
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="compile">
<mkdir dir="${classes.dir}" />
<javac srcdir="src" destdir="${classes.dir}" classpathref="classpath" />
</target>
<target name="doc">
<javadoc packagenames="calabash.java.*" sourcepath="src" defaultexcludes="yes" destdir="${doc.dir}" author="true" version="true" use="true" windowtitle="Calabash-ios-java" classpathref="classpath">
<group title="Group 1 Packages" packages="com.thoughtworks.automation.orchestrion.*" />
<link href="http://developer.java.sun.com/developer/products/xml/docs/api/" />
</javadoc>
</target>
<path id="classpath">
<fileset dir="${deps.dir}" includes="**/*.jar" />
</path>
<target name="jar" depends="-ensure-gems-zip-is-present, compile, doc">
<property name="scripts.dir" value="${classes.dir}/scripts" />
<mkdir dir="${scripts.dir}" />
<copy file="scripts/launcher.rb" todir="${scripts.dir}" />
<copy file="${gems.zip.path}" todir="${scripts.dir}" />
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.file}" basedir="${classes.dir}">
<manifest>
<attribute name="Project-Name" value="calabash-ios-java" />
<attribute name="Built-By" value="${user.name}" />
<attribute name="Created-By" value="Navaneeth K N ([email protected])" />
<attribute name="Manifest-Version" value="${version}" />
<attribute name="Built-Date" value="${current.date}" />
<attribute name="Implementation-Version" value="${version}" />
</manifest>
</jar>
<jar destfile="${doc.jar}" basedir="${doc.dir}" />
</target>
<target name="-ensure-gems-zip-is-present">
<fail message="Path to gems.zip is required. Provide it like 'ant -Dgems.zip.path=PATH'" unless="gems.zip.path" />
</target>
<target name="distro" depends="jar">
<mkdir dir="${distro.dir}" />
<copy file="${jar.file}" todir="${distro.dir}" />
<copy file="${doc.jar}" todir="${distro.dir}" />
<copy file="${deps.dir}/jruby-complete-1.7.4.jar" todir="${distro.dir}" />
<copy file="${deps.dir}/log4j-1.2.17.jar" todir="${distro.dir}" />
<copy file="LICENSE.txt" todir="${distro.dir}" />
<copy file="README.md" todir="${distro.dir}" />
<copy file="CONTRIBUTORS.txt" todir="${distro.dir}" />
<zip basedir="${distro.dir}" includes="**" destfile="${distro.file}" />
</target>
</project>