Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 102 lines (84 sloc) 3.951 kB
a98b22c added ALL kinds of new shit
alan@ubergibson.com authored
1 <project name="campfireclient" default="compile" basedir=".">
2
3 <property file="build.properties"/>
4 <property file="${user.home}/build.properties"/>
5
6 <property name="app.name" value="campfireclient"/>
7 <property name="app.version" value="0.1-dev"/>
8 <property name="app.fullname" value="${app.name}-${app.version}"/>
9
10 <property name="build.home" value="${basedir}/build"/>
11 <property name="dist.home" value="${basedir}/dist"/>
12
13 <property name="docs.home" value="${basedir}/docs"/>
14 <property name="src.home" value="${basedir}/src"/>
15 <property name="lib.home" value="${basedir}/lib"/>
16 <property name="etc.home" value="${basedir}/etc"/>
17 <property name="js.home" value="${src.home}/js"/>
18
19 <property name="jarfile.dist" value="${dist.home}/${app.fullname}.jar"/>
20 <property name="zipfile.dist" value="${dist.home}/${app.fullname}.zip"/>
21
22
23 <property name="compile.debug" value="true"/>
24 <property name="compile.deprecation" value="true"/>
25 <property name="compile.optimize" value="true"/>
26 <property name="compile.mainclass" value="org.ubergibson.campfireclient.ConsoleClient"/>
27
28 <!-- detect java version -->
29 <available property="jdk1.3+" classname="java.lang.StrictMath"/>
30 <available property="jdk1.4+" classname="java.lang.CharSequence"/>
31 <available property="jdk1.5+" classname="java.lang.Readable"/>
32
33 <path id="compile.classpath">
34 <pathelement path="${src.home}"/>
35 <fileset dir="${lib.home}" includes="*.jar"/>
36 </path>
37
38 <target name="all" depends="clean,compile"
39 description="Clean build and dist directories, then compile"/>
40
41 <target name="clean" description="Delete build and dist directories">
42 <delete dir="${build.home}"/>
43 <delete dir="${dist.home}"/>
44 </target>
45
46 <target name="prepare" description="Create build and dist directories">
47 <!-- Create build directories as needed -->
48 <mkdir dir="${build.home}"/>
49 <mkdir dir="${dist.home}"/>
50 </target>
51
52 <target name="compile" depends="prepare" description="Compile Java sources">
53 <!-- Compile Java classes as necessary -->
54 <javac srcdir="${src.home}"
55 destdir="${build.home}"
56 debug="${compile.debug}"
57 deprecation="${compile.deprecation}"
58 optimize="${compile.optimize}"
59 classpathref="compile.classpath">
60 </javac>
61 </target>
62
63 <target name="jar" depends="compile"
64 description="Create jar file of classes, resources, and dependencies">
65 <!-- Create application JAR file -->
66 <jar jarfile="${jarfile.dist}"
67 basedir="${build.home}"
68 index="true">
69 <manifest>
70 <attribute name="Built-By" value="${user.name}"/>
71 <attribute name="Implementation-Vendor" value="Ubergibson.com"/>
72 <attribute name="Implementation-Title" value="CampfireClient"/>
73 <attribute name="Implementation-Version" value="0.1-dev"/>
74 <attribute name="Main-Class" value="${compile.mainclass}"/>
75 </manifest>
76 <fileset dir="${build.home}"/>
77 <fileset dir="${js.home}"/>
78 <fileset dir="${etc.home}"/>
79 <zipgroupfileset dir="${lib.home}"/>
80 </jar>
81 </target>
82
83 <target name="javadoc" depends="compile"
84 description="Create Javadoc API documentation">
85 <mkdir dir="${docs.home}/api"/>
86 <javadoc sourcepath="${src.home}" destdir="${docs.home}/api"
87 packagenames="*">
88 <classpath refid="compile.classpath"/>
89 </javadoc>
90 </target>
91
f479447 fixed 'dist' target to depend on javadoc
alan@ubergibson.com authored
92 <target name="dist" depends="jar,javadoc"
a98b22c added ALL kinds of new shit
alan@ubergibson.com authored
93 description="Create binary distribution">
94 <zip destfile="${dist.home}/${app.fullname}.zip">
95 <zipfileset file="${jarfile.dist}" prefix="${app.fullname}"/>
96 <zipfileset dir="${docs.home}" prefix="${app.fullname}/docs"
97 excludes="api/**"/>
98 </zip>
99 </target>
100
101 </project>
Something went wrong with that request. Please try again.