Commit | Line | Data |
---|---|---|
7d4115a5 KL |
1 | <!-- |
2 | ||
3 | Jexer - Java Text User Interface - Ant build | |
4 | ||
5 | $Id$ | |
6 | ||
7 | This program is licensed under the GNU Lesser General Public License | |
8 | Version 3. Please see the file "COPYING" in this directory for more | |
9 | information about the GNU Lesser General Public License Version 3. | |
10 | ||
11 | Copyright (C) 2015 Kevin Lamonte | |
12 | ||
13 | This library is free software; you can redistribute it and/or modify | |
14 | it under the terms of the GNU Lesser General Public License as | |
15 | published by the Free Software Foundation; either version 3 of the | |
16 | License, or (at your option) any later version. | |
17 | ||
18 | This program is distributed in the hope that it will be useful, | |
19 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | GNU General Public License for more details. | |
22 | ||
23 | You should have received a copy of the GNU Lesser General Public | |
24 | License along with this program; if not, see | |
25 | http://www.gnu.org/licenses/, or write to the Free Software | |
26 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 | |
27 | USA | |
28 | ||
29 | --> | |
30 | ||
31 | <project name="jexer" basedir="." default="run"> | |
32 | ||
33 | <property name="src.dir" value="src"/> | |
34 | <property name="build.dir" value="build"/> | |
35 | <property name="classes.dir" value="${build.dir}/classes"/> | |
36 | <property name="jar.dir" value="${build.dir}/jar"/> | |
37 | ||
38 | <property name="demo.class" value="Demo1"/> | |
39 | ||
40 | <target name="clean"> | |
41 | <delete dir="${build.dir}"/> | |
42 | </target> | |
43 | ||
44 | <target name="compile"> | |
45 | <mkdir dir="${classes.dir}"/> | |
46 | <javac srcdir="${src.dir}" destdir="${classes.dir}" | |
47 | includeantruntime="false"/> | |
48 | </target> | |
49 | ||
50 | <target name="jar" depends="compile"> | |
51 | <mkdir dir="${jar.dir}"/> | |
52 | <jar destfile="${jar.dir}/${ant.project.name}.jar" | |
53 | basedir="${classes.dir}" | |
54 | excludes="**/Demo*" > | |
55 | </jar> | |
56 | </target> | |
57 | ||
58 | <target name="demos" depends="jar"> | |
59 | <mkdir dir="${classes.dir}"/> | |
60 | <javac srcdir="demos" destdir="${classes.dir}" | |
61 | includeantruntime="false"/> | |
62 | </target> | |
63 | ||
05dbb28d | 64 | <target name="run" depends="jar,docs,demos"> |
7d4115a5 KL |
65 | <java classname="${demo.class}" fork="false"> |
66 | <classpath> | |
67 | <path location="${jar.dir}/${ant.project.name}.jar"/> | |
68 | <path location="${classes.dir}"/> | |
69 | </classpath> | |
70 | </java> | |
71 | </target> | |
72 | ||
73 | <target name="clean-build" depends="clean,jar"/> | |
74 | ||
75 | <target name="main" depends="clean,run"/> | |
05dbb28d KL |
76 | |
77 | <target name="docs" depends="jar"> | |
78 | <javadoc | |
79 | destdir="docs/api" | |
80 | author="true" | |
81 | version="true" | |
82 | use="true" | |
83 | access="private" | |
84 | failonwarning="true" | |
85 | windowtitle="Jexer - Java Text User Interface - API docs"> | |
86 | ||
87 | <fileset dir="${src.dir}" defaultexcludes="yes"> | |
88 | <include name="jexer/**"/> | |
89 | <exclude name="demos/**"/> | |
90 | </fileset> | |
91 | ||
92 | <doctitle> | |
93 | <![CDATA[<h1>Test</h1>]]> | |
94 | </doctitle> | |
95 | <bottom> | |
96 | <![CDATA[<i>Copyright © 2015 Kevin Lamonte. Licensed LGPLv3+</i>]]> | |
97 | </bottom> | |
98 | <!-- | |
99 | <tag name="todo" scope="all" description="To do:"/> | |
100 | <group title="Group 1 Packages" packages="com.dummy.test.a*"/> | |
101 | <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/> | |
102 | <link offline="true" | |
103 | href="http://docs.oracle.com/javase/7/docs/api/" | |
104 | packagelistLoc="C:\tmp"/> | |
105 | <link href="http://docs.oracle.com/javase/7/docs/api/"/> | |
106 | --> | |
107 | </javadoc> | |
108 | </target> | |
109 | ||
7d4115a5 | 110 | </project> |