-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
142 lines (105 loc) · 4.45 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
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2011 Zodiac Interactive, LLC. All Rights Reserved.
-->
<project name="Tomcat" basedir="."
default="release">
<property environment="env"/>
<property name="bin.dir" value="bin"/>
<property name="builds.dir" value="builds"/>
<property name="tests.dir" value="tests"/>
<property name="tests.bin.dir" value="${tests.dir}/bin"/>
<property name="robocode.dir" location="C:\Users\1\opt\rc"/>
<property name="robocode.jar" value="${robocode.dir}\libs\robocode.jar"/>
<property name="robot.version" value="3.68"/>
<property name="robot.name" value="Tomcat"/>
<property name="robot.jar" value="${builds.dir}\lxx.${robot.name}_${robot.version}.jar"/>
<path id="src.files">
<pathelement location="src"/>
</path>
<target name="init">
<mkdir dir="${bin.dir}"/>
</target>
<target name="compile" depends="init" description="Compiles source files">
<javac destdir="${bin.dir}" debug="on" debuglevel="lines,vars,source" optimize="yes" target="1.5">
<src refid="src.files"/>
<classpath>
<pathelement location="${robocode.jar}"/>
</classpath>
</javac>
<copyfile src="src/lxx/${robot.name}.properties" dest="bin/lxx/${robot.name}.properties"/>
</target>
<target name="clean" description="Deletes all previous build artifacts">
<delete dir="${bin.dir}"/>
</target>
<target name="release" depends="clean, compile">
<tstamp>
<format property="TODAY" pattern="dd.MM.yyyy"/>
</tstamp>
<tstamp>
<format property="NOW" pattern="HH:mm:ss ZZZ"/>
</tstamp>
<copy todir="${bin.dir}">
<fileset dir="src"/>
</copy>
<echo file="${bin.dir}/lxx/${robot.name}.properties">robocode.version=1.7.3
robot.java.source.included=true
robot.version=${robot.version}
robot.author.name=Alexey jdev Zhidkov
robot.classname=lxx.${robot.name}
robot.name=${robot.name}
robot.description=Positive killer. Build time: ${TODAY} ${NOW}
robot.webpage=http://www.robowiki.net/wiki/${robot.name}
</echo>
<echo file="${bin.dir}/lxx/${robot.name}.data/${robot.name}.properties">lxx.${robot.name}.mode=normal
</echo>
<jar destfile="${builds.dir}\lxx.${robot.name}_${robot.version}.jar" compress="true">
<fileset dir="${bin.dir}"/>
</jar>
<copy todir="${robocode.dir}\robots\">
<fileset file="${builds.dir}\lxx.${robot.name}_${robot.version}.jar"/>
</copy>
<delete includeEmptyDirs="true">
<fileset dir="${bin.dir}" includes="**/*"/>
</delete>
</target>
<target name="debug" depends="clean, compile">
<property name="robot.version.dbg" value="${robot.version}.debug"/>
<tstamp>
<format property="TODAY" pattern="dd.MM.yyyy"/>
</tstamp>
<tstamp>
<format property="NOW" pattern="HH:mm:ss ZZZ"/>
</tstamp>
<copy todir="${bin.dir}">
<fileset dir="src"/>
</copy>
<echo file="${bin.dir}/lxx/${robot.name}.properties">robocode.version=1.7.3
robot.java.source.included=true
robot.version=${robot.version.dbg}
robot.author.name=Alexey jdev Zhidkov
robot.classname=lxx.${robot.name}
robot.name=${robot.name}
robot.description=Positive killer. Build time: ${TODAY} ${NOW}
robot.webpage=http://www.robowiki.net/wiki/${robot.name}
</echo>
<echo file="${bin.dir}/lxx/${robot.name}.data/${robot.name}.properties">lxx.${robot.name}.mode=normal
aegm.debug=true
record_my_waves=true
</echo>
<jar destfile="${builds.dir}\lxx.${robot.name}_${robot.version.dbg}.jar" compress="true">
<fileset dir="${bin.dir}"/>
</jar>
<copy todir="${robocode.dir}\robots\">
<fileset file="${builds.dir}\lxx.${robot.name}_${robot.version.dbg}.jar"/>
</copy>
<delete includeEmptyDirs="true">
<fileset dir="${bin.dir}" includes="**/*"/>
</delete>
<delete file="${builds.dir}\lxx.${robot.name}_${robot.version.dbg}.jar"/>
</target>
<target name="build-all">
<antcall target="release"/>
<antcall target="debug"/>
</target>
</project>