forked from KronicDeth/intellij-elixir
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodule_intellij-elixir.xml
349 lines (304 loc) · 16.1 KB
/
module_intellij-elixir.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
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
<?xml version="1.0" encoding="UTF-8"?>
<project name="module_intellij-elixir" default="compile.module.intellij-elixir">
<dirname property="module.intellij-elixir.basedir" file="${ant.file.module_intellij-elixir}"/>
<import file="${module.intellij-elixir.basedir}/idea.xml"/>
<import file="${module.intellij-elixir.basedir}/elixir.xml"/>
<property name="module.jdk.home.intellij-elixir" value="${project.jdk.home}"/>
<property name="module.jdk.bin.intellij-elixir" value="${project.jdk.bin}"/>
<property name="module.jdk.classpath.intellij-elixir" value="${project.jdk.classpath}"/>
<property name="compiler.args.intellij-elixir" value="-encoding UTF-8 -source 1.6 ${compiler.args}"/>
<property name="intellij-elixir.bin.dir" value="${module.intellij-elixir.basedir}/bin" />
<property name="intellij-elixir.jps-shared.output.dir" value="${module.intellij-elixir.basedir}/out/production/jps-shared" />
<property name="intellij-elixir.jps-builder.output.dir" value="${module.intellij-elixir.basedir}/out/production/jps-builder" />
<property name="intellij-elixir.output.dir" value="${module.intellij-elixir.basedir}/out/production/intellij-elixir"/>
<property name="intellij-elixir.testoutput.dir" value="${module.intellij-elixir.basedir}/out/test/intellij-elixir"/>
<path id="intellij-elixir.module.bootclasspath">
<!-- Paths to be included in compilation bootclasspath -->
</path>
<path id="intellij-elixir.module.production.classpath">
<path refid="${module.jdk.classpath.intellij-elixir}"/>
<path refid="library.junit.classpath"/>
<pathelement location="${idea.cache}/lib/hamcrest-core-1.3.jar"/>
<pathelement location="${idea.cache}/lib/hamcrest-library-1.3.jar"/>
<pathelement location="${idea.cache}/lib/junit-4.11.jar"/>
</path>
<path id="intellij-elixir.runtime.production.module.classpath">
<pathelement location="${intellij-elixir.output.dir}"/>
<path refid="library.junit.classpath"/>
<pathelement location="${idea.cache}/lib/hamcrest-core-1.3.jar"/>
<pathelement location="${idea.cache}/lib/hamcrest-library-1.3.jar"/>
<pathelement location="${idea.cache}/lib/junit-4.11.jar"/>
</path>
<path id="intellij-elixir.module.classpath">
<path refid="${module.jdk.classpath.intellij-elixir}"/>
<pathelement location="${intellij-elixir.output.dir}"/>
<path refid="library.junit.classpath"/>
<pathelement location="#{basedir}/tests/objenesis-2.1.jar"/>
<pathelement location="#{basedir}/tests/mockito-2.1.jar"/>
<pathelement location="${idea.cache}/lib/hamcrest-core-1.3.jar"/>
<pathelement location="${idea.cache}/lib/hamcrest-library-1.3.jar"/>
<pathelement location="${idea.cache}/lib/junit-4.11.jar"/>
</path>
<path id="intellij-elixir.runtime.module.classpath">
<pathelement location="${intellij-elixir.testoutput.dir}"/>
<pathelement location="${intellij-elixir.output.dir}"/>
<path refid="library.junit.classpath"/>
<pathelement location="${idea.cache}/lib/hamcrest-core-1.3.jar"/>
<pathelement location="${idea.cache}/lib/hamcrest-library-1.3.jar"/>
<pathelement location="${idea.cache}/lib/junit-4.11.jar"/>
</path>
<patternset id="excluded.from.module.intellij-elixir">
<patternset refid="ignored.files"/>
</patternset>
<patternset id="excluded.from.compilation.intellij-elixir">
<patternset refid="excluded.from.module.intellij-elixir"/>
</patternset>
<path id="intellij-elixir.module.jps-shared.sourcepath">
<dirset dir="${module.intellij-elixir.basedir}/jps-shared">
<include name="src"/>
</dirset>
</path>
<path id="intellij-elixir.module.jps-builder.sourcepath">
<dirset dir="${module.intellij-elixir.basedir}/jps-builder">
<include name="src"/>
</dirset>
</path>
<path id="intellij-elixir.module.sourcepath">
<dirset dir="${module.intellij-elixir.basedir}">
<include name="src"/>
<include name="gen"/>
<include name="res"/>
</dirset>
</path>
<path id="intellij-elixir.module.test.sourcepath">
<dirset dir="${module.intellij-elixir.basedir}">
<include name="tests"/>
<include name="testData"/>
</dirset>
</path>
<target name="compile.module.intellij-elixir" depends="compile.module.intellij-elixir.production,compile.module.intellij-elixir.tests" description="Compile module intellij-elixir"/>
<target name="compile.module.jps-shared.production" depends="register.custom.compilers,set.elixir.code.lib.dir" description="Compile module jps-shared; production classes">
<mkdir dir="${intellij-elixir.jps-shared.output.dir}"/>
<javac2 destdir="${intellij-elixir.jps-shared.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.intellij-elixir}/javac">
<compilerarg line="${compiler.args.intellij-elixir}"/>
<bootclasspath refid="intellij-elixir.module.bootclasspath"/>
<classpath>
<path refid="intellij-elixir.module.production.classpath"/>
<path>
<fileset dir="${elixir.code.lib.dir}">
<include name="jinterface-*/priv/OtpErlang.jar"/>
</fileset>
</path>
</classpath>
<src refid="intellij-elixir.module.jps-shared.sourcepath"/>
<patternset refid="excluded.from.compilation.intellij-elixir"/>
</javac2>
<copy todir="${intellij-elixir.jps-shared.output.dir}">
<fileset dir="${module.intellij-elixir.basedir}/jps-shared/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.jps-builder.production" depends="register.custom.compilers,compile.module.jps-shared.production,set.elixir.code.lib.dir" description="Compile module jps-builder; production classes">
<mkdir dir="${intellij-elixir.jps-builder.output.dir}"/>
<javac2 destdir="${intellij-elixir.jps-builder.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.intellij-elixir}/javac">
<compilerarg line="${compiler.args.intellij-elixir}"/>
<bootclasspath refid="intellij-elixir.module.bootclasspath"/>
<classpath refid="intellij-elixir.module.production.classpath"/>
<classpath path="${intellij-elixir.jps-shared.output.dir}"/>
<src refid="intellij-elixir.module.jps-builder.sourcepath"/>
<patternset refid="excluded.from.compilation.intellij-elixir"/>
</javac2>
<copy todir="${intellij-elixir.jps-builder.output.dir}">
<fileset dir="${module.intellij-elixir.basedir}/jps-builder/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.intellij-elixir.production" depends="register.custom.compilers,compile.module.jps-shared.production,compile.module.jps-builder.production,set.elixir.code.lib.dir" description="Compile module intellij-elixir; production classes">
<mkdir dir="${intellij-elixir.output.dir}"/>
<javac2 destdir="${intellij-elixir.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.intellij-elixir}/javac">
<compilerarg line="${compiler.args.intellij-elixir}"/>
<bootclasspath refid="intellij-elixir.module.bootclasspath"/>
<classpath refid="intellij-elixir.module.production.classpath"/>
<classpath path="${intellij-elixir.jps-shared.output.dir}"/>
<classpath path="${intellij-elixir.jps-builder.output.dir}"/>
<classpath>
<path>
<fileset dir="${elixir.code.lib.dir}">
<include name="jinterface-*/priv/OtpErlang.jar"/>
</fileset>
</path>
</classpath>
<src refid="intellij-elixir.module.sourcepath"/>
<patternset refid="excluded.from.compilation.intellij-elixir"/>
</javac2>
<copy todir="${intellij-elixir.output.dir}">
<fileset dir="${module.intellij-elixir.basedir}/src">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.intellij-elixir.basedir}/gen">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.intellij-elixir.basedir}/res">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="compile.module.intellij-elixir.tests" depends="register.custom.compilers,compile.module.intellij-elixir.production,set.elixir.code.lib.dir" description="compile module intellij-elixir; test classes" unless="skip.tests">
<mkdir dir="${intellij-elixir.testoutput.dir}"/>
<javac2 destdir="${intellij-elixir.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.intellij-elixir}/javac">
<compilerarg line="${compiler.args.intellij-elixir}"/>
<bootclasspath refid="intellij-elixir.module.bootclasspath"/>
<classpath refid="intellij-elixir.module.classpath"/>
<classpath>
<path>
<fileset dir="${elixir.code.lib.dir}">
<include name="jinterface-*/priv/OtpErlang.jar"/>
</fileset>
</path>
</classpath>
<src refid="intellij-elixir.module.test.sourcepath"/>
<patternset refid="excluded.from.compilation.intellij-elixir"/>
</javac2>
<copy todir="${intellij-elixir.testoutput.dir}">
<fileset dir="${module.intellij-elixir.basedir}/tests">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
<fileset dir="${module.intellij-elixir.basedir}/testData">
<patternset refid="compiler.resources"/>
<type type="file"/>
</fileset>
</copy>
</target>
<target name="clean.module.intellij-elixir" description="cleanup module">
<delete dir="${intellij-elixir.jps-shared.output.dir}"/>
<delete dir="${intellij-elixir.jps-builder.output.dir}"/>
<delete dir="${intellij-elixir.output.dir}"/>
<delete dir="${intellij-elixir.testoutput.dir}"/>
</target>
<path id="classpath.test">
<path refid="intellij-elixir.module.production.classpath"/>
<pathelement location="${intellij-elixir.output.dir}"/>
<pathelement location="${intellij-elixir.testoutput.dir}"/>
<pathelement location="${idea.cache}/lib/guava-17.0.jar"/>
<!-- 2016.3 -->
<pathelement location="${idea.cache}/lib/guava-19.0.jar"/>
</path>
<property name="test" value="tests"/>
<import file="${module.intellij-elixir.basedir}/elixir.xml"/>
<import file="${module.intellij-elixir.basedir}/intellij_elixir.xml"/>
<target name="test.module.intellij-elixir" depends="compile.module.intellij-elixir,release.intellij_elixir,set.elixir.code.lib.dir,unpack.elixir.zip" description="test module">
<mkdir dir="tmp"/>
<mkdir dir="tmp/results"/>
<property environment="env"/>
<exec executable="${intellij_elixir.executable}">
<arg value="start"/>
<env key="PATH" value="${env.PATH}:${elixir.output.zip.root.dir}/bin"/>
</exec>
<!-- must fork or env won't work -->
<junit failureproperty="failure_found"
fork="true"
forkmode="once"
haltonfailure="no"
printsummary="on"
showoutput="yes">
<env key="ELIXIR_LANG_ELIXIR_PATH" value="${elixir.output.zip.root.dir}"/>
<env key="INTELLIJ_ELIXIR_PATH" value="${module.intellij-elixir.basedir}"/>
<env key="ELIXIR_EBIN_DIRECTORY" value="${elixir.output.zip.root.dir}/lib/elixir/ebin/"/>
<classpath>
<path refid="classpath.test" />
<path>
<fileset dir="${elixir.code.lib.dir}">
<include name="jinterface-*/priv/OtpErlang.jar"/>
</fileset>
</path>
<pathelement location="${basedir}/tests/mockito-core-2.0.7-beta.jar"/>
<pathelement location="${basedir}/tests/objenesis-2.1.jar"/>
<pathelement location="${test.build}"/>
<pathelement location="${idea.cache}/lib/junit-4.11.jar"/>
</classpath>
<formatter type="brief" usefile="false"/>
<formatter type="xml"/>
<batchtest todir="tmp/results">
<fileset dir="${test}">
<include name="**/*Test*.java"/>
<!-- Marked with @Ignore annotation, but not ignored for unknown reason -->
<exclude name="org/elixir_lang/parser_definition/ParsingTestCase.java"/>
<exclude name="org/elixir_lang/parser_definition/**/ParsingTestCase.java"/>
<!-- TODO get inspection tests to work with ant -->
<exclude name="org/elixir_lang/inspection/*TestCase.java"/>
<!-- Causes ERROR: Problems during index shutdown. TODO get fix from https://devnet.jetbrains.com/message/5539376#5539376 -->
<exclude name="org/elixir_lang/action/*Test.java"/>
<exclude name="org/elixir_lang/mix/importWizard/*Test.java"/>
</fileset>
</batchtest>
</junit>
<exec executable="${intellij_elixir.executable}">
<arg value="stop"/>
</exec>
<!-- generate report with junitreport -->
<junitreport todir="tmp">
<fileset dir="tmp/results" />
<report todir="tmp/report" />
</junitreport>
<!-- concat the report through a filter chain to extract what you want -->
<concat>
<fileset file="tmp/report/overview-summary.html" />
<filterchain>
<linecontainsregexp>
<regexp pattern='title="Display all tests"' />
</linecontainsregexp>
<tokenfilter>
<replaceregex pattern='<td><a title="Display all tests" href="all-tests.html">(\d+)</a></td><td><a title="Display all failures" href="alltests-fails.html">(\d+)</a></td><td><a title="Display all errors" href="alltests-errors.html">(\d+).*$' replace="Run: \1, Failed: \2, Errors: \3" />
</tokenfilter>
</filterchain>
</concat>
<antcall target="check_test"/>
</target>
<target name="check_test" if="failure_found">
<fail message="Failures found"/>
</target>
<property name="intellij-elixir.plugin.path.jar" value="${module.intellij-elixir.basedir}/intellij-elixir.zip"/>
<!-- Build archive for plugin 'intellij-elixir' -->
<target name="plugin.build.jar.intellij-elixir" depends="compile.module.intellij-elixir" description="Build plugin archive for module 'intellij-elixir'">
<property name="tmp.dir.intellij-elixir" value="${module.intellij-elixir.basedir}/../temp"/>
<mkdir dir="${tmp.dir.intellij-elixir}"/>
<mkdir dir="${tmp.dir.intellij-elixir}/lib"/>
<mkdir dir="${tmp.dir.intellij-elixir}/lib/jps"/>
<jar destfile="${tmp.dir.intellij-elixir}/lib/jps-shared.jar" duplicate="preserve">
<zipfileset dir="${intellij-elixir.jps-shared.output.dir}"/>
<manifest>
<attribute name="Created-By" value="IntelliJ IDEA"/>
<attribute name="Manifest-Version" value="1.0"/>
</manifest>
</jar>
<jar destfile="${tmp.dir.intellij-elixir}/lib/jps/jps-builder.jar" duplicate="preserve">
<zipfileset dir="${intellij-elixir.jps-builder.output.dir}"/>
<manifest>
<attribute name="Created-By" value="IntelliJ IDEA"/>
<attribute name="Manifest-Version" value="1.0"/>
</manifest>
</jar>
<jar destfile="${tmp.dir.intellij-elixir}/lib/intellij-elixir.jar" duplicate="preserve">
<zipfileset dir="${intellij-elixir.output.dir}"/>
<manifest>
<attribute name="Created-By" value="IntelliJ IDEA"/>
<attribute name="Manifest-Version" value="1.0"/>
</manifest>
</jar>
<copy file="${idea.cache}/lib/junit-4.11.jar" tofile="${tmp.dir.intellij-elixir}/lib/junit-4.11.jar"/>
<copy file="${idea.cache}/lib/hamcrest-core-1.3.jar" tofile="${tmp.dir.intellij-elixir}/lib/hamcrest-core-1.3.jar"/>
<copy file="${idea.cache}/lib/hamcrest-library-1.3.jar" tofile="${tmp.dir.intellij-elixir}/lib/hamcrest-library-1.3.jar"/>
<zip destfile="${intellij-elixir.plugin.path.jar}">
<fileset dir="${module.intellij-elixir.basedir}/../temp"/>
</zip>
<delete dir="${tmp.dir.intellij-elixir}"/>
</target>
</project>