71 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
			
		
		
	
	
			71 lines
		
	
	
		
			2.8 KiB
		
	
	
	
		
			XML
		
	
	
	
	
	
| <?xml version="1.0" encoding="UTF-8"?>
 | |
| <project name="MMOCore" default="build" basedir=".">
 | |
| 	<description>
 | |
| 		This script will build the MMOCore lib.
 | |
| 
 | |
| 		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, 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, write to the Free Software
 | |
| 		Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 | |
| 		02111-1307, USA.
 | |
| 
 | |
| 		http://www.gnu.org/copyleft/gpl.html
 | |
| 	</description>
 | |
| 
 | |
| 	<property name="src" location="src" />
 | |
| 	<property name="build" location="build" />
 | |
| 	<property name="build.classes" location="${build}/classes" />
 | |
| 	<property name="build.dist" location="${build}/dist" />
 | |
| 
 | |
| 	<target name="init" depends="clean,checkRequirements" description="Create the output directories.">
 | |
| 		<mkdir dir="${build}" />
 | |
| 		<mkdir dir="${build.classes}" />
 | |
| 	</target>
 | |
| 
 | |
| 	<target name="compile" depends="init" description="Compile the source.">
 | |
| 		<javac srcdir="${src}" destdir="${build.classes}" compiler="modern" debug="true" debuglevel="lines,vars,source" includeantruntime="false" source="1.8" target="1.8" />
 | |
| 	</target>
 | |
| 
 | |
| 	<target name="jar" depends="compile" description="Create the jar file.">
 | |
| 		<jar destfile="${build.dist}/mmocore.jar" level="9">
 | |
| 			<fileset dir="${build.classes}" />
 | |
| 			<manifest>
 | |
| 				<attribute name="Built-By" value="${user.name}" />
 | |
| 				<attribute name="Built-Date" value="${build.tstamp}" />
 | |
| 			</manifest>
 | |
| 		</jar>
 | |
| 	</target>
 | |
| 
 | |
| 	<target name="dist" depends="jar">
 | |
| 		<concat destfile="${build.dist}/MMOCore_CHANGELOG.txt">${l2j.changelog}</concat>
 | |
| 	</target>
 | |
| 
 | |
| 	<target name="build" depends="dist" description="Generates a zip with the MMOCore.">
 | |
| 		<zip destfile="${build}/mmocore.zip" basedir="${build.dist}" level="9" />
 | |
| 	</target>
 | |
| 
 | |
| 	<target name="clean" description="Remove the output directories.">
 | |
| 		<delete dir="${build}" />
 | |
| 	</target>
 | |
| 
 | |
| 	<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.lang.AutoCloseable" property="JDK8.present" />
 | |
| 		<fail unless="JDK8.present" message="Java 1.8 is required. But your version is Java ${ant.java.version} and probably JDK is not installed." />
 | |
| 	</target>
 | |
| </project> | 
