Commit | Line | Data |
---|---|---|
7d4115a5 KL |
1 | <!-- |
2 | ||
3 | Jexer - Java Text User Interface - Ant build | |
4 | ||
e16dda65 KL |
5 | The MIT License (MIT) |
6 | ||
a2018e99 | 7 | Copyright (C) 2017 Kevin Lamonte |
e16dda65 KL |
8 | |
9 | Permission is hereby granted, free of charge, to any person | |
10 | obtaining a copy of this software and associated documentation | |
11 | files (the "Software"), to deal in the Software without | |
12 | restriction, including without limitation the rights to use, copy, | |
13 | modify, merge, publish, distribute, sublicense, and/or sell copies | |
14 | of the Software, and to permit persons to whom the Software is | |
15 | furnished to do so, subject to the following conditions: | |
16 | ||
17 | The above copyright notice and this permission notice shall be | |
18 | included in all copies or substantial portions of the Software. | |
19 | ||
20 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | |
21 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | |
22 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | |
23 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS | |
24 | BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN | |
25 | ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN | |
26 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
27 | SOFTWARE. | |
7d4115a5 KL |
28 | |
29 | --> | |
30 | ||
8caf0d51 | 31 | <project name="jexer" basedir="." default="jar"> |
7d4115a5 | 32 | |
591688f5 KL |
33 | <!-- I test with gcj because it is Java 1.5 and has better warnings |
34 | for unused imports. --> | |
e685a47d | 35 | <property name="build.compiler" value="gcj"/> |
e16dda65 | 36 | |
f6d90207 | 37 | <property name="version" value="0.0.6"/> |
e16dda65 KL |
38 | <property name="src.dir" value="src"/> |
39 | <property name="resources.dir" value="resources"/> | |
40 | <property name="build.dir" value="build"/> | |
41 | <property name="classes.dir" value="${build.dir}/classes"/> | |
42 | <property name="jar.dir" value="${build.dir}/jar"/> | |
43 | <property name="apidocs.dir" value="docs/api"/> | |
44 | ||
45 | <target name="clean"> | |
46 | <delete dir="${build.dir}"/> | |
47 | <delete dir="${apidocs.dir}"/> | |
48 | </target> | |
49 | ||
50 | <target name="compile"> | |
51 | <mkdir dir="${classes.dir}"/> | |
52 | <javac srcdir="${src.dir}" destdir="${classes.dir}" | |
591688f5 KL |
53 | includeantruntime="false" |
54 | debug="on" | |
55 | debuglevel="lines,vars,source" | |
56 | /> | |
e16dda65 KL |
57 | </target> |
58 | ||
59 | <target name="jar" depends="compile"> | |
60 | <mkdir dir="${jar.dir}"/> | |
61 | <jar destfile="${jar.dir}/${ant.project.name}.jar" | |
591688f5 | 62 | basedir="${classes.dir}"> |
e16dda65 | 63 | <fileset dir="${resources.dir}"/> |
339652cc KL |
64 | |
65 | <!-- Include properties files. --> | |
66 | <fileset dir="${src.dir}" includes="**/*.properties"/> | |
67 | ||
e16dda65 KL |
68 | <!-- Include source by default. --> |
69 | <fileset dir="${src.dir}"/> | |
339652cc | 70 | |
e16dda65 | 71 | <manifest> |
591688f5 KL |
72 | <attribute name="Main-Class" value="jexer.demos.Demo1"/> |
73 | <attribute name="Implementation-Version" value="${version}"/> | |
e16dda65 KL |
74 | </manifest> |
75 | </jar> | |
76 | </target> | |
77 | ||
78 | <target name="run" depends="jar"> | |
79 | <java jar="${jar.dir}/${ant.project.name}.jar" fork="true"> | |
80 | <arg value="-Djexer.Swing=true"/> | |
81 | </java> | |
82 | </target> | |
83 | ||
84 | <target name="clean-build" depends="clean,jar"/> | |
85 | ||
86 | <target name="build" depends="jar"/> | |
87 | ||
88 | <target name="doc" depends="docs"/> | |
89 | ||
90 | <target name="docs" depends="jar"> | |
91 | <javadoc | |
591688f5 KL |
92 | destdir="${apidocs.dir}" |
93 | author="true" | |
94 | version="true" | |
95 | use="true" | |
96 | access="protected" | |
97 | failonwarning="true" | |
98 | windowtitle="Jexer - Java Text User Interface - API docs"> | |
e16dda65 KL |
99 | |
100 | <fileset dir="${src.dir}" defaultexcludes="yes"> | |
339652cc | 101 | <include name="jexer/**/*.java"/> |
e16dda65 KL |
102 | </fileset> |
103 | ||
104 | <doctitle> | |
591688f5 | 105 | <![CDATA[<h1>Jexer - Java Text User Interface Library</h1>]]> |
e16dda65 KL |
106 | </doctitle> |
107 | <bottom> | |
591688f5 | 108 | <![CDATA[<i>Copyright © 2017 Kevin Lamonte. Licensed MIT.</i>]]> |
e16dda65 KL |
109 | </bottom> |
110 | <!-- | |
591688f5 KL |
111 | <tag name="todo" scope="all" description="To do:"/> |
112 | <group title="Group 1 Packages" packages="com.dummy.test.a*"/> | |
113 | <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/> | |
114 | <link offline="true" | |
115 | href="http://docs.oracle.com/javase/7/docs/api/" | |
116 | packagelistLoc="C:\tmp"/> | |
117 | <link href="http://docs.oracle.com/javase/7/docs/api/"/> | |
e16dda65 KL |
118 | --> |
119 | </javadoc> | |
120 | </target> | |
70f5b2bb | 121 | |
7d4115a5 | 122 | </project> |