This repository has been archived by the owner on Oct 3, 2023. It is now read-only.
forked from jmc2obj/j-mc-2-obj
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
50 lines (37 loc) · 1.93 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project default="create_run_jar" name="Create Runnable Jar for Project jMc2Obj">
<target name="compile">
<javac srcdir="src" destdir="bin" target="1.7" source="1.7" includeantruntime="false"/>
<copy todir="bin">
<fileset dir="resources" />
</copy>
<copy todir="bin/conf">
<fileset dir="conf" includes="**" />
</copy>
</target>
<target name="create_run_jar" depends="compile">
<tstamp />
<loadproperties>
<file file="version.prop" />
</loadproperties>
<echo>version = ${version}</echo>
<propertyfile file="version.prop">
<entry key="version" default="0" type="int" operation="+" value="1" />
</propertyfile>
<echo message="<?xml version="1.0" encoding="UTF-8" standalone="no"?> " append="false" file="${basedir}/data/version.xml" />
<echo message="<version> " append="true" file="${basedir}/data/version.xml" />
<echo message=" <revision>${version}</revision> " append="true" file="${basedir}/data/version.xml" />
<echo message=" <date>${DSTAMP} ${TSTAMP}</date> " append="true" file="${basedir}/data/version.xml" />
<echo message="</version> " append="true" file="${basedir}/data/version.xml" />
<copy file="${basedir}/data/version.xml" tofile="${basedir}/bin/data/version.xml" overwrite="true" />
<jar destfile="${basedir}/JAR/jMc2Obj-${version}.jar" filesetmanifest="mergewithoutmain">
<manifest>
<attribute name="Main-Class" value="org.jmc.Main" />
<attribute name="Class-Path" value="." />
<attribute name="Implementation-Version" value="${version}" />
<attribute name="Built-Date" value="${DSTAMP} ${TSTAMP}" />
</manifest>
<fileset dir="${basedir}/bin" />
</jar>
</target>
</project>