-
Notifications
You must be signed in to change notification settings - Fork 0
/
lite.xml
240 lines (198 loc) · 9.85 KB
/
lite.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
228
229
230
231
232
233
234
235
236
237
238
239
240
<?xml version="1.0" encoding="UTF-8"?>
<project name="lite" default="all">
<property file="lite.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="700m"/>
<patternset id="ignored.files">
<exclude name="**/*.hprof/**"/>
<exclude name="**/*.pyc/**"/>
<exclude name="**/*.pyo/**"/>
<exclude name="**/*.rbc/**"/>
<exclude name="**/*.yarb/**"/>
<exclude name="**/*~/**"/>
<exclude name="**/.DS_Store/**"/>
<exclude name="**/.git/**"/>
<exclude name="**/.hg/**"/>
<exclude name="**/.svn/**"/>
<exclude name="**/CVS/**"/>
<exclude name="**/__pycache__/**"/>
<exclude name="**/_svn/**"/>
<exclude name="**/vssver.scc/**"/>
<exclude name="**/vssver2.scc/**"/>
</patternset>
<patternset id="library.patterns">
<include name="*.war"/>
<include name="*.swc"/>
<include name="*.apk"/>
<include name="*.zip"/>
<include name="*.egg"/>
<include name="*.ane"/>
<include name="*.jar"/>
<include name="*.ear"/>
</patternset>
<patternset id="compiler.resources">
<exclude name="**/?*.java"/>
<exclude name="**/?*.form"/>
<exclude name="**/?*.class"/>
<exclude name="**/?*.groovy"/>
<exclude name="**/?*.scala"/>
<exclude name="**/?*.flex"/>
<exclude name="**/?*.kt"/>
<exclude name="**/?*.clj"/>
<exclude name="**/?*.aj"/>
</patternset>
<!-- JDK definitions -->
<property name="jdk.bin.1.8" value="${jdk.home.1.8}/bin"/>
<path id="jdk.classpath.1.8">
<fileset dir="${jdk.home.1.8}">
<include name="../java-1.8.0-openjdk-amd64/jre/lib/charsets.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/cldrdata.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/dnsns.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/icedtea-sound.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/jaccess.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/java-atk-wrapper.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/localedata.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/nashorn.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/sunec.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/sunjce_provider.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/sunpkcs11.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/ext/zipfs.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/jce.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/jsse.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/management-agent.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/resources.jar"/>
<include name="../java-1.8.0-openjdk-amd64/jre/lib/rt.jar"/>
</fileset>
</path>
<property name="project.jdk.home" value="${jdk.home.1.8}"/>
<property name="project.jdk.bin" value="${jdk.bin.1.8}"/>
<property name="project.jdk.classpath" value="jdk.classpath.1.8"/>
<!-- Project Libraries -->
<path id="library.java-cup-11b-runtime.classpath">
<pathelement location="${basedir}/java-cup-11b-runtime.jar"/>
</path>
<path id="library.junit4.classpath">
<pathelement location="${basedir}/../../../usr/share/java/junit4.jar"/>
</path>
<!-- Register Custom Compiler Taskdefs -->
<property name="javac2.home" value="${idea.home}/lib"/>
<path id="javac2.classpath">
<fileset dir="${javac2.home}">
<include name="javac2.jar"/>
<include name="jdom.jar"/>
<include name="asm-all*.jar"/>
<include name="jgoodies-forms.jar"/>
</fileset>
</path>
<target name="register.custom.compilers">
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions"
classpathref="javac2.classpath"/>
</target>
<!-- Modules -->
<!-- Module lite -->
<dirname property="module.lite.basedir" file="${ant.file}"/>
<property name="module.jdk.home.lite" value="${project.jdk.home}"/>
<property name="module.jdk.bin.lite" value="${project.jdk.bin}"/>
<property name="module.jdk.classpath.lite" value="${project.jdk.classpath}"/>
<property name="compiler.args.lite" value="-encoding UTF-8 -source 8 -target 8 ${compiler.args}"/>
<property name="lite.output.dir" value="${module.lite.basedir}/out/production/lite"/>
<property name="lite.testoutput.dir" value="${module.lite.basedir}/out/test/lite"/>
<path id="lite.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="lite.module.production.classpath">
<path refid="${module.jdk.classpath.lite}"/>
<path refid="library.junit4.classpath"/>
<path refid="library.java-cup-11b-runtime.classpath"/>
</path>
<path id="lite.runtime.production.module.classpath">
<pathelement location="${lite.output.dir}"/>
<path refid="library.junit4.classpath"/>
<path refid="library.java-cup-11b-runtime.classpath"/>
</path>
<path id="lite.module.classpath">
<path refid="${module.jdk.classpath.lite}"/>
<pathelement location="${lite.output.dir}"/>
<path refid="library.junit4.classpath"/>
<path refid="library.java-cup-11b-runtime.classpath"/>
</path>
<path id="lite.runtime.module.classpath">
<pathelement location="${lite.testoutput.dir}"/>
<pathelement location="${lite.output.dir}"/>
<path refid="library.junit4.classpath"/>
<path refid="library.java-cup-11b-runtime.classpath"/>
</path>
<patternset id="excluded.from.module.lite">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.lite">
<patternset refid="excluded.from.module.lite"/>
</patternset>
<path id="lite.module.sourcepath">
<dirset dir="${module.lite.basedir}">
<include name="src"/>
</dirset>
</path>
<target name="compile.module.lite" depends="compile.module.lite.production,compile.module.lite.tests"
description="Compile module lite"/>
<target name="compile.module.lite.production" depends="register.custom.compilers"
description="Compile module lite; production classes">
<mkdir dir="${lite.output.dir}"/>
<javac2 destdir="${lite.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}"
memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.lite}/javac">
<compilerarg line="${compiler.args.lite}"/>
<bootclasspath refid="lite.module.bootclasspath"/>
<classpath refid="lite.module.production.classpath"/>
<src refid="lite.module.sourcepath"/>
<patternset refid="excluded.from.compilation.lite"/>
</javac2>
<copy todir="${lite.output.dir}">
<fileset dir="${module.lite.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.lite.tests" depends="register.custom.compilers,compile.module.lite.production"
description="compile module lite; test classes" unless="skip.tests"/>
<target name="clean.module.lite" description="cleanup module">
<delete dir="${lite.output.dir}"/>
<delete dir="${lite.testoutput.dir}"/>
</target>
<target name="init" description="Build initialization">
<!-- Perform any build initialization in this target -->
</target>
<target name="clean" depends="clean.module.lite" description="cleanup all"/>
<target name="build.modules" depends="init, clean, compile.module.lite" description="build all modules"/>
<target name="init.artifacts">
<property name="artifacts.temp.dir" value="${basedir}/__artifacts_temp"/>
<property name="artifact.output.lite" value="${basedir}/out/artifacts/Lite"/>
<mkdir dir="${artifacts.temp.dir}"/>
<property name="temp.jar.path.lite.jar" value="${artifacts.temp.dir}/lite.jar"/>
</target>
<target name="artifact.lite" depends="init.artifacts, compile.module.lite"
description="Build 'Lite' artifact">
<property name="artifact.temp.output.lite" value="${artifacts.temp.dir}/Lite"/>
<mkdir dir="${artifact.temp.output.lite}"/>
<jar destfile="${temp.jar.path.lite.jar}" duplicate="preserve" filesetmanifest="mergewithoutmain">
<zipfileset file="${basedir}/META-INF/MANIFEST.MF" prefix="META-INF"/>
<zipfileset dir="${lite.output.dir}"/>
</jar>
<copy file="${temp.jar.path.lite.jar}" tofile="${artifact.temp.output.lite}/lite.jar"/>
</target>
<target name="build.all.artifacts" depends="artifact.lite" description="Build all artifacts">
<mkdir dir="${artifact.output.lite}"/>
<copy todir="${artifact.output.lite}">
<fileset dir="${artifact.temp.output.lite}"/>
</copy>
<!-- Delete temporary files -->
<delete dir="${artifacts.temp.dir}"/>
</target>
<target name="all" depends="build.modules, build.all.artifacts" description="build all"/>
</project>