-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
227 lines (190 loc) · 9.11 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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2009-2010, Sergey Karakovskiy and Julian Togelius
~ All rights reserved.
~
~ Redistribution and use in source and binary forms, with or without
~ modification, are permitted provided that the following conditions are met:
~ * Redistributions of source code must retain the above copyright
~ notice, this list of conditions and the following disclaimer.
~ * Redistributions in binary form must reproduce the above copyright
~ notice, this list of conditions and the following disclaimer in the
~ documentation and/or other materials provided with the distribution.
~ * Neither the name of the Mario AI nor the
~ names of its contributors may be used to endorse or promote products
~ derived from this software without specific prior written permission.
~
~ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
~ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
~ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
~ IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
~ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
~ NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
~ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
~ WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
~ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
~ POSSIBILITY OF SUCH DAMAGE.
-->
<project name="trunk" default="all">
<property file="build.properties"/>
<!-- Uncomment the following property if no tests compilation is needed -->
<!--
<property name="skip.tests" value="true"/>
-->
<!-- Compiler options -->
<property name="compiler.debug" value="on"/>
<property name="compiler.generate.no.warnings" value="off"/>
<property name="compiler.args" value=""/>
<property name="compiler.max.memory" value="128m"/>
<patternset id="ignored.files">
<exclude name="**/CVS/**"/>
<exclude name="**/SCCS/**"/>
<exclude name="**/RCS/**"/>
<exclude name="**/rcs/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/.pyc/**"/>
<exclude name="**/.pyo/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/*.hprof/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/.sbas/**"/>
<exclude name="**/.IJI.*/**"/>
<exclude name="**/vssver.scc/**"/>
<exclude name="**/vssver2.scc/**"/>
<exclude name="**/*.lib/**"/>
<exclude name="**/*~/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.zip"/>
<include name="*.war"/>
<include name="*.egg"/>
<include name="*.ear"/>
<include name="*.swc"/>
<include name="*.jar"/>
</patternset>
<patternset id="compiler.resources">
<include name="**/?*.properties"/>
<include name="**/?*.xml"/>
<include name="**/?*.gif"/>
<include name="**/?*.png"/>
<include name="**/?*.jpeg"/>
<include name="**/?*.jpg"/>
<include name="**/?*.html"/>
<include name="**/?*.dtd"/>
<include name="**/?*.tld"/>
<include name="**/?*.ftl"/>
<include name="**/?*.dat"/>
<include name="**/?*.lvl"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.5" value="${jdk.home.1.5}/bin"/>
<path id="jdk.classpath.1.5">
<fileset dir="${jdk.home.1.5}">
<include name="lib/deploy.jar"/>
<include name="lib/dt.jar"/>
<include name="lib/jce.jar"/>
<include name="lib/plugin.jar"/>
<include name="lib/sa-jdi.jar"/>
<include name="../Classes/charsets.jar"/>
<include name="../Classes/classes.jar"/>
<include name="../Classes/dt.jar"/>
<include name="../Classes/jce.jar"/>
<include name="../Classes/jconsole.jar"/>
<include name="../Classes/jsse.jar"/>
<include name="../Classes/laf.jar"/>
<include name="../Classes/ui.jar"/>
<include name="lib/ext/apple_provider.jar"/>
<include name="lib/ext/dnsns.jar"/>
<include name="lib/ext/localedata.jar"/>
<include name="lib/ext/sunjce_provider.jar"/>
<include name="lib/ext/sunpkcs11.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.6}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.6}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.6"/>
<!-- Project Libraries -->
<!-- Modules -->
<!-- Module Trunk -->
<dirname property="module.trunk.basedir" file="${ant.file}"/>
<property name="module.jdk.home.trunk" value="${jdk.home.1.5}"/>
<property name="module.jdk.bin.trunk" value="${jdk.bin.1.5}"/>
<property name="module.jdk.classpath.trunk" value="jdk.classpath.1.5"/>
<property name="compiler.args.trunk" value="${compiler.args}"/>
<property name="trunk.output.dir" value="${module.trunk.basedir}/bin"/>
<property name="trunk.testoutput.dir" value="${module.trunk.basedir}/bin"/>
<path id="trunk.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="trunk.module.production.classpath">
<path refid="${module.jdk.classpath.trunk}"/>
<pathelement location="${basedir}/lib/jdom.jar"/>
<pathelement location="${basedir}/lib/junit-4.8.2.jar"/>
<pathelement location="${idea.home}/plugins/testng/lib/testng-jdk15.jar"/>
</path>
<path id="trunk.runtime.production.module.classpath">
<pathelement location="${trunk.output.dir}"/>
<pathelement location="${basedir}/lib/jdom.jar"/>
<pathelement location="${basedir}/lib/junit-4.8.2.jar"/>
<pathelement location="${idea.home}/plugins/testng/lib/testng-jdk15.jar"/>
</path>
<path id="trunk.module.classpath">
<path refid="${module.jdk.classpath.trunk}"/>
<pathelement location="${trunk.output.dir}"/>
<pathelement location="${basedir}/lib/jdom.jar"/>
<pathelement location="${basedir}/lib/junit-4.8.2.jar"/>
<pathelement location="${idea.home}/plugins/testng/lib/testng-jdk15.jar"/>
</path>
<path id="trunk.runtime.module.classpath">
<pathelement location="${trunk.output.dir}"/>
<pathelement location="${basedir}/lib/jdom.jar"/>
<pathelement location="${basedir}/lib/junit-4.8.2.jar"/>
<pathelement location="${idea.home}/plugins/testng/lib/testng-jdk15.jar"/>
</path>
<patternset id="excluded.from.module.trunk">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.trunk">
<patternset refid="excluded.from.module.trunk"/>
</patternset>
<path id="trunk.module.sourcepath">
<dirset dir="${module.trunk.basedir}">
<include name="src"/>
</dirset>
</path>
<target name="compile.module.trunk" depends="compile.module.trunk.production,compile.module.trunk.tests"
description="Compile module Trunk"/>
<target name="compile.module.trunk.production" description="Compile module Trunk; production classes">
<mkdir dir="${trunk.output.dir}"/>
<javac destdir="${trunk.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.trunk}/javac">
<compilerarg line="${compiler.args.trunk}"/>
<bootclasspath refid="trunk.module.bootclasspath"/>
<classpath refid="trunk.module.production.classpath"/>
<src refid="trunk.module.sourcepath"/>
<patternset refid="excluded.from.compilation.trunk"/>
</javac>
<copy todir="${trunk.output.dir}">
<fileset dir="${module.trunk.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.trunk.tests" depends="compile.module.trunk.production"
description="compile module Trunk; test classes" unless="skip.tests"/>
<target name="clean.module.trunk" description="cleanup module">
<delete dir="${trunk.output.dir}"/>
<delete dir="${trunk.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.trunk" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.trunk" description="build all modules"/>
<target name="all" depends="build.modules" description="build all"/>
</project>