-
Notifications
You must be signed in to change notification settings - Fork 61
Expand file tree
/
Copy pathbuild.xml
More file actions
77 lines (65 loc) · 3.24 KB
/
Copy pathbuild.xml
File metadata and controls
77 lines (65 loc) · 3.24 KB
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
76
77
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xml>
<project name="L2ClientDat" default="cleanup" basedir=".">
<description>
This file is part of the L2ClientDat project.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see [http://www.gnu.org/licenses/].
</description>
<property name="build" location="../build" />
<property name="build.bin" location="${build}/bin" />
<property name="build.dist" location="${build}/dist" />
<property name="build.dist.libs" location="${build.dist}/libs" />
<property name="dist" location="dist" />
<property name="libs" location="${dist}/libs" />
<property name="src" location="java" />
<target name="checkRequirements" description="Check Requirements.">
<fail message="Ant 1.8.2 is required. But your version is ${ant.version} and if you are using Eclipse probably is outdated.">
<condition>
<not>
<antversion atleast="1.8.2" />
</not>
</condition>
</fail>
<available classname="java.util.stream.Stream" property="JDK24.present" />
<fail unless="JDK24.present" message="Java 24 is required. But your version is Java ${ant.java.version} and probably JDK is not installed." />
</target>
<target name="init" depends="checkRequirements" description="Create the output directories.">
<delete dir="${build.bin}" quiet="true" />
<mkdir dir="${build.bin}" />
</target>
<target name="compile" depends="init" description="Compile the source.">
<javac srcdir="${src}" destdir="${build.bin}" compiler="modern" debug="true" debuglevel="lines,vars,source" includeantruntime="false" source="24" target="24" encoding="UTF-8" />
</target>
<target name="jar" depends="compile" description="Create the jar files.">
<tstamp>
<format property="time.stamp" pattern="yyyy-MM-dd HH:mm:ss z" />
</tstamp>
<jar destfile="${build.dist.libs}/L2ClientDat.jar" level="9">
<fileset dir="${build.bin}" />
<manifest>
<attribute name="Build-By" value="${user.name}" />
<attribute name="Build-Date" value="${time.stamp}" />
<attribute name="Implementation-URL" value="http://www.l2jmobius.org/" />
<attribute name="Main-Class" value="org.l2jmobius.L2ClientDat" />
</manifest>
</jar>
</target>
<target name="adding-core" depends="jar" description="Adding the compiled jars to the Zip file.">
<zip destfile="${build}/L2ClientDat.zip" basedir="${build.dist}" level="9" />
</target>
<target name="adding-dist" depends="adding-core" description="Updating the Zip file with distribution content.">
<zip destfile="${build}/L2ClientDat.zip" basedir="${dist}" excludes="**/*-sources.jar" update="true" level="9" />
</target>
<target name="cleanup" depends="adding-dist" description="Cleaning the build folder.">
<delete dir="${build.dist}" />
</target>
</project>