revert merge
[nikiroo-utils.git] / build.xml
CommitLineData
7d4115a5
KL
1<!--
2
3 Jexer - Java Text User Interface - Ant build
4
e16dda65
KL
5 The MIT License (MIT)
6
c1d8e2b8 7 Copyright (C) 2019 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
c334c9a2 33 <property name="version" value="1.0.0"/>
e16dda65
KL
34 <property name="src.dir" value="src"/>
35 <property name="resources.dir" value="resources"/>
36 <property name="build.dir" value="build"/>
37 <property name="classes.dir" value="${build.dir}/classes"/>
38 <property name="jar.dir" value="${build.dir}/jar"/>
39 <property name="apidocs.dir" value="docs/api"/>
40
41 <target name="clean">
42 <delete dir="${build.dir}"/>
43 <delete dir="${apidocs.dir}"/>
44 </target>
45
46 <target name="compile">
47 <mkdir dir="${classes.dir}"/>
48 <javac srcdir="${src.dir}" destdir="${classes.dir}"
591688f5
KL
49 includeantruntime="false"
50 debug="on"
51 debuglevel="lines,vars,source"
227d6812
KL
52 target="1.6"
53 source="1.6"
b2efac6e 54 >
5ca5f8e5
KL
55 <compilerarg value="-Xlint"/>
56 <compilerarg value="-Xdiags:verbose"/>
b2efac6e
KL
57 <compilerarg value="-Xlint:deprecation" />
58 </javac>
e16dda65
KL
59 </target>
60
61 <target name="jar" depends="compile">
62 <mkdir dir="${jar.dir}"/>
63 <jar destfile="${jar.dir}/${ant.project.name}.jar"
591688f5 64 basedir="${classes.dir}">
ed76cd41
KL
65
66 <fileset dir="${resources.dir}">
67 <exclude name="**/*TTF-4.39.ttf" />
68 <exclude name="**/*Italic*.ttf" />
69 </fileset>
339652cc
KL
70
71 <!-- Include properties files. -->
72 <fileset dir="${src.dir}" includes="**/*.properties"/>
73
e16dda65 74 <!-- Include source by default. -->
eb29bbb5 75 <!-- <fileset dir="${src.dir}"/> -->
339652cc 76
e16dda65 77 <manifest>
591688f5
KL
78 <attribute name="Main-Class" value="jexer.demos.Demo1"/>
79 <attribute name="Implementation-Version" value="${version}"/>
e16dda65
KL
80 </manifest>
81 </jar>
82 </target>
83
84 <target name="run" depends="jar">
85 <java jar="${jar.dir}/${ant.project.name}.jar" fork="true">
86 <arg value="-Djexer.Swing=true"/>
87 </java>
88 </target>
89
90 <target name="clean-build" depends="clean,jar"/>
91
92 <target name="build" depends="jar"/>
93
94 <target name="doc" depends="docs"/>
95
a39c5665
KL
96 <!--
97 For Java 11+, add additionalparam="dash-dash-frames". My
98 workflow is back to Java 8, so leaving this comment here for
99 myself when Debian stables moves to Java 11.
100 -->
101
e5a4c47b 102 <target name="docs" depends="jar">
e16dda65 103 <javadoc
591688f5
KL
104 destdir="${apidocs.dir}"
105 author="true"
106 version="true"
107 use="true"
108 access="protected"
abb84744 109 windowtitle="Jexer - Java Text User Interface - API docs"
e5a4c47b 110 additionalparam="--frames"
abb84744 111 >
e16dda65 112 <fileset dir="${src.dir}" defaultexcludes="yes">
339652cc 113 <include name="jexer/**/*.java"/>
e16dda65
KL
114 </fileset>
115
116 <doctitle>
591688f5 117 <![CDATA[<h1>Jexer - Java Text User Interface Library</h1>]]>
e16dda65
KL
118 </doctitle>
119 <bottom>
c1d8e2b8 120 <![CDATA[<i>Copyright &#169; 2019 Kevin Lamonte. Licensed MIT.</i>]]>
e16dda65
KL
121 </bottom>
122 <!--
591688f5
KL
123 <tag name="todo" scope="all" description="To do:"/>
124 <group title="Group 1 Packages" packages="com.dummy.test.a*"/>
125 <group title="Group 2 Packages" packages="com.dummy.test.b*:com.dummy.test.c*"/>
126 <link offline="true"
127 href="http://docs.oracle.com/javase/7/docs/api/"
128 packagelistLoc="C:\tmp"/>
129 <link href="http://docs.oracle.com/javase/7/docs/api/"/>
e16dda65
KL
130 -->
131 </javadoc>
132 </target>
70f5b2bb 133
7d4115a5 134</project>