forked from JetBrains/kotlin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_dependencies.xml
437 lines (369 loc) · 20.9 KB
/
update_dependencies.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
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
<project name="Update Dependencies" default="update">
<property name="jb.buildserver.build.id" value="2422648"/>
<property name="public.buildserver.build.id" value="122840"/>
<condition property="os.tag" value="win.zip">
<os family="windows" />
</condition>
<condition property="os.tag" value="mac.zip">
<os family="mac" />
</condition>
<condition property="os.tag" value="tar.gz">
<and>
<os family="unix" />
<not>
<os family="mac"/>
</not>
</and>
</condition>
<property name="idea.build.number" value="135.SNAPSHOT"/>
<property name="idea.archive.name" value="ideaIC-${idea.build.number}.${os.tag}"/>
<property name="idea.sdk.fetch.needed" value="true"/>
<property name="continuous.idea.version" value=".lastSuccessful"/>
<target name="update" depends="fetch-third-party,fetch-annotations">
<execute_update
base.url="http://teamcity.jetbrains.com/guestAuth/repository/download/bt410/${public.buildserver.build.id}:id"
build.zip="${idea.archive.name}"
/>
</target>
<target name="jb_update" depends="fetch-third-party,fetch-annotations">
<execute_update
base.url="http://buildserver.labs.intellij.net/guestAuth/repository/download/bt3498/${jb.buildserver.build.id}:id"
build.zip="${idea.archive.name}"
/>
</target>
<target name="jb_update_continuous_local" depends="fetch-third-party,fetch-annotations">
<execute_update
base.url="http://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_IjPlatform13_IdeaTrunk_Installers/${continuous.idea.version}"
build.zip="ideaIC-{build.number}.win.zip"
/>
</target>
<target name="jb_update_continuous" depends="fetch-third-party,fetch-annotations">
<execute_update
base.url="file:///${basedir}/idea_artifacts"
build.zip="${idea.archive.name}"
/>
</target>
<macrodef name="get-maven-library">
<attribute name="prefix"/>
<attribute name="lib"/>
<attribute name="version"/>
<attribute name="bin" default="true"/>
<attribute name="src" default="true"/>
<attribute name="server" default="http://repository.jetbrains.com/remote-repos"/>
<attribute name="jar.name.base" default="@{lib}-@{version}"/>
<attribute name="target.jar.name.base" default="@{jar.name.base}"/>
<attribute name="path" default="@{prefix}/@{lib}/@{version}/@{jar.name.base}"/>
<attribute name="download" default="dependencies/download"/>
<attribute name="dependencies" default="dependencies"/>
<sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<if>
<istrue value="@{bin}"/>
<then>
<get src="@{server}/@{path}.jar"
dest="@{download}/@{jar.name.base}.jar" usetimestamp="true"/>
<copy file="@{download}/@{jar.name.base}.jar" tofile="@{dependencies}/@{target.jar.name.base}.jar" overwrite="true"/>
</then>
</if>
<if>
<istrue value="@{src}"/>
<then>
<get src="@{server}/@{path}-sources.jar"
dest="@{download}/@{jar.name.base}-sources.jar" usetimestamp="true"/>
<copy file="@{download}/@{jar.name.base}-sources.jar" tofile="@{dependencies}/@{target.jar.name.base}-sources.jar" overwrite="true"/>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="get-ant-library">
<attribute name="version"/>
<attribute name="folderName"/>
<sequential>
<get src="http://archive.apache.org/dist/ant/binaries/apache-ant-@{version}-bin.tar.gz"
dest="dependencies/download/apache-ant-@{version}-bin.tar.gz" usetimestamp="true"/>
<get src="http://archive.apache.org/dist/ant/source/apache-ant-@{version}-src.zip"
dest="dependencies/apache-ant-@{version}-src.zip" usetimestamp="true"/>
<delete dir="dependencies/@{folderName}" failonerror="false"/>
<untar src="dependencies/download/apache-ant-@{version}-bin.tar.gz" dest="dependencies" compression="gzip"/>
<move file="dependencies/apache-ant-@{version}" tofile="dependencies/@{folderName}"/>
</sequential>
</macrodef>
<target name="fetch-third-party">
<mkdir dir="dependencies"/>
<mkdir dir="dependencies/download"/>
<!-- ProGuard -->
<get src="http://heanet.dl.sourceforge.net/project/proguard/proguard%20beta/4.8beta/proguard4.8beta1.zip"
dest="dependencies/download/proguard4.8beta1.zip" usetimestamp="true"/>
<delete file="dependencies/proguard.jar" failonerror="false"/>
<unzip src="dependencies/download/proguard4.8beta1.zip" dest="dependencies">
<patternset>
<include name="proguard4.8beta1/lib/proguard.jar"/>
</patternset>
<mapper type="flatten"/>
</unzip>
<!-- ant contrib -->
<get src="http://heanet.dl.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip"
dest="dependencies/download/ant-contrib-1.0b3-bin.zip" usetimestamp="true"/>
<delete file="dependencies/ant-contrib.jar" failonerror="false"/>
<unzip src="dependencies/download/ant-contrib-1.0b3-bin.zip" dest="dependencies">
<patternset>
<include name="ant-contrib/ant-contrib-1.0b3.jar"/>
</patternset>
<mapper type="merge" to="ant-contrib.jar"/>
</unzip>
<!-- JarJar -->
<get src="http://jarjar.googlecode.com/files/jarjar-1.2.jar" dest="dependencies/download/jarjar-1.2.jar" usetimestamp="true"/>
<copy file="dependencies/download/jarjar-1.2.jar" tofile="dependencies/jarjar.jar" overwrite="true"/>
<!-- ant 1.7.0, 1.8.0 -->
<get-ant-library version="1.7.0" folderName="ant-1.7"/>
<get-ant-library version="1.8.0" folderName="ant-1.8"/>
<!-- dx.jar -->
<get-maven-library prefix="com/google/android/tools" lib="dx" version="1.7" target.jar.name.base="dx"/>
<!-- hamcrest-core.jar -->
<get-maven-library prefix="org/hamcrest" lib="hamcrest-core" version="1.3" target.jar.name.base="hamcrest-core"/>
<!-- jflex 1.4 -->
<mkdir dir="dependencies/jflex"/>
<get src="https://raw.github.com/JetBrains/intellij-community/master/tools/lexer/jflex-1.4/lib/JFlex.jar"
dest="dependencies/jflex/JFlex.jar" usetimestamp="true" />
<get src="https://raw.github.com/JetBrains/intellij-community/master/tools/lexer/idea-flex.skeleton"
dest="dependencies/jflex/idea-flex.skeleton" usetimestamp="true" />
<!-- jline -->
<get-maven-library prefix="jline" lib="jline" version="2.9" target.jar.name.base="jline"/>
<!-- jansi -->
<!--
<get-maven-library prefix="org/fusesource/jansi" lib="jansi" version="1.9"/>
-->
<!-- Guava 14 sources-->
<get-maven-library prefix="com/google/guava" lib="guava" version="14.0.1" bin="false"/>
<!-- ASM 4 -->
<get-asm4-and-rename-packages/>
<!-- Protocol Buffers -->
<get-maven-library prefix="com/google/protobuf" lib="protobuf-java" version="2.5.0" bin="false"/>
<!-- CLI Parser -->
<get-maven-library prefix="com/github/spullara/cli-parser" lib="cli-parser" version="1.1.1"/>
<!-- Closure Compiler -->
<!-- A download url taken from http://code.google.com/p/closure-compiler/wiki/BinaryDownloads -->
<get src="http://dl.google.com/closure-compiler/compiler-20131014.zip"
dest="dependencies/download/closure-compiler.zip" usetimestamp="true"/>
<delete file="dependencies/closure-compiler.jar" failonerror="false"/>
<unzip src="dependencies/download/closure-compiler.zip" dest="dependencies">
<patternset>
<include name="compiler.jar"/>
</patternset>
<mapper type="merge" to="closure-compiler.jar"/>
</unzip>
<delete file="dependencies/android.jar" failonerror="false"/>
<get src="http://dl-ssl.google.com/android/repository/android-19_r02.zip"
dest="dependencies/download/android-sdk.zip" usetimestamp="true"/>
<unzip src="dependencies/download/android-sdk.zip" dest="dependencies">
<patternset>
<include name="**/android.jar"/>
</patternset>
<mapper type="flatten"/>
</unzip>
<!-- Bootstrap compiler -->
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/bt345/bootstrap.tcbuildtag/kotlin-plugin-{build.number}.zip"
dest="dependencies/download/bootstrap-compiler.zip" usetimestamp="true"/>
<delete dir="dependencies/bootstrap-compiler" failonerror="false"/>
<unzip src="dependencies/download/bootstrap-compiler.zip" dest="dependencies/bootstrap-compiler"/>
</target>
<macrodef name="get-asm4-and-rename-packages">
<sequential>
<!-- Download vanilla ASM 4.0 & unzip the needed jars and sources from idea13 build (with debug info and patched for java 8) -->
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/bt410/83470:id/jps/asm4-all.jar" dest="dependencies/jetbrains-asm-debug-all-4.0.jar" usetimestamp="true"/>
<get-maven-library prefix="org/ow2/asm" lib="asm-debug-all" version="4.0" bin="false"/>
<!-- Rename packages in the sources -->
<delete dir="dependencies/download/asm-src" failonerror="false"/>
<unzip src="dependencies/download/asm-debug-all-4.0-sources.jar" dest="dependencies/download/asm-src">
<patternset>
<include name="**/*"/>
</patternset>
</unzip>
<replaceregexp match="org\.objectweb\.asm" replace="org.jetbrains.asm4" flags="g">
<fileset dir="dependencies/download/asm-src/">
<include name="**/*.java"/>
</fileset>
</replaceregexp>
<move file="dependencies/download/asm-src/org/objectweb/asm"
tofile="dependencies/download/asm-src/org/jetbrains/asm4"/>
<zip destfile="dependencies/jetbrains-asm-all-4.0-src.zip" basedir="dependencies/download/asm-src"/>
</sequential>
</macrodef>
<macrodef name="execute_update">
<attribute name="base.url" default="http://teamcity.example.com/guestAuth/repository/download/btXXX/XXXX:id"/>
<attribute name="base.url.for.core" default="@{base.url}"/>
<attribute name="build.zip" default="ideaIC-XXX.SNAPSHOT.win.zip"/>
<sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<property name="core" value="ideaSDK/core"/>
<property name="jps" value="ideaSDK/jps"/>
<property name="jps-test" value="${jps}/test"/>
<if>
<istrue value="${idea.sdk.fetch.needed}"/>
<then>
<delete dir="ideaSDK" failonerror="false">
<exclude name="config/**"/>
<exclude name="system/**"/>
<exclude name="system-idea/**"/>
</delete>
<mkdir dir="${core}"/>
<mkdir dir="${jps}"/>
<mkdir dir="${jps-test}"/>
<get src="@{base.url.for.core}/core/intellij-core.jar" dest="${core}/intellij-core.jar" usetimestamp="true"/>
<get src="@{base.url}/core/annotations.jar" dest="${core}/annotations.jar" usetimestamp="true"/>
<get src="@{base.url}/core/guava-14.0.1.jar" dest="${core}/guava-14.0.1.jar" usetimestamp="true"/>
<get src="@{base.url}/core/picocontainer.jar" dest="${core}/picocontainer.jar" usetimestamp="true"/>
<get src="@{base.url}/core/trove4j.jar" dest="${core}/trove4j.jar" usetimestamp="true"/>
<!--<get src="@{base.url}/core/snappy-java-1.0.5.jar" dest="${core}/snappy-java-1.0.5.jar" usetimestamp="true"/>-->
<copy file="dependencies/jetbrains-asm-debug-all-4.0.jar" todir="${jps}"/>
<get src="@{base.url}/jps/groovy-jps-plugin.jar" dest="${jps}/groovy-jps-plugin.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/groovy_rt.jar" dest="${jps}/groovy_rt.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/jdom.jar" dest="${jps}/jdom.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/jgoodies-forms.jar" dest="${jps}/jgoodies-forms.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/jna.jar" dest="${jps}/jna.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/jps-builders.jar" dest="${jps}/jps-builders.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/jps-model.jar" dest="${jps}/jps-model.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/log4j.jar" dest="${jps}/log4j.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/nanoxml-2.2.3.jar" dest="${jps}/nanoxml-2.2.3.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/protobuf-2.5.0.jar" dest="${jps}/protobuf-2.5.0.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/trove4j.jar" dest="${jps}/trove4j.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/ui-designer-jps-plugin.jar" dest="${jps}/ui-designer-jps-plugin.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/util.jar" dest="${jps}/util.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/test/jps-build-test.jar" dest="${jps-test}/jps-build-test.jar" usetimestamp="true"/>
<get src="@{base.url}/@{build.zip}" dest="dependencies/download/@{build.zip}" usetimestamp="true"/>
<delete file="dependencies/download/idea-sdk-sources.zip" failonerror="false"/>
<get src="@{base.url}/sources.zip" dest="dependencies/download/idea-sdk-sources.zip" usetimestamp="true"/>
</then>
</if>
<if>
<matches pattern=".+\.win\.zip" string="@{build.zip}"/>
<then>
<unzip src="dependencies/download/@{build.zip}" dest="ideaSDK"/>
</then>
<elseif>
<matches pattern=".+\.mac\.zip" string="@{build.zip}"/>
<then>
<unzip src="dependencies/download/@{build.zip}" dest="ideaSDK">
<cutdirsmapper dirs="1"/>
</unzip>
<!-- Java can't manipulate permissions -->
<exec executable="chmod">
<arg value="a+x"/>
<arg path="ideaSDK/bin/fsnotifier"/>
<arg path="ideaSDK/bin/inspect.sh"/>
<arg path="ideaSDK/bin/printenv.py"/>
<arg path="ideaSDK/bin/restarter"/>
</exec>
</then>
</elseif>
<else>
<untar src="dependencies/download/@{build.zip}" dest="ideaSDK" compression="gzip">
<cutdirsmapper dirs="1"/>
</untar>
<!-- Java can't manipulate permissions -->
<exec executable="chmod">
<arg value="a+x"/>
<arg path="ideaSDK/bin/fsnotifier"/>
<arg path="ideaSDK/bin/fsnotifier64"/>
<arg path="ideaSDK/bin/inspect.sh"/>
<arg path="ideaSDK/bin/idea.sh"/>
</exec>
</else>
</if>
<mkdir dir="ideaSDK/sources"/>
<copy file="dependencies/download/idea-sdk-sources.zip" tofile="ideaSDK/sources/sources.zip"/>
<copy file="ideaSDK/lib/jdom.jar" todir="${core}"/>
<copy file="ideaSDK/lib/jna.jar" todir="${core}"/>
<copy file="ideaSDK/lib/log4j.jar" todir="${core}"/>
<copy file="ideaSDK/lib/xstream-1.4.3.jar" todir="${core}"/>
<copy file="ideaSDK/lib/xpp3-1.1.4-min.jar" todir="${core}"/>
<copy file="ideaSDK/lib/jsr166e.jar" todir="${core}" />
<copy file="dependencies/jetbrains-asm-debug-all-4.0.jar" todir="${core}"/>
<copy file="dependencies/jetbrains-asm-debug-all-4.0.jar" todir="ideaSDK/lib"/>
<!-- TODO temporary workaround since util-rt is not packaged into intellij-core.jar -->
<copy file="ideaSDK/lib/util.jar" todir="${core}"/>
<!--
This one needs to be deleted because otherwise it gets onto the classpath
together with junit-4.10.jar and the classloading goes crazy that breaks
many nice features of IDEA including diffs in the test console.
-->
<delete file="ideaSDK/lib/junit.jar"/>
<!--
The asm4-all.jar bundled with IDEA has no debug information in it, and we replace it
with jetbrains-asm-debug-all-4.0.jar
-->
<delete file="ideaSDK/lib/asm4-all.jar"/>
</sequential>
</macrodef>
<target name="fetch-annotations">
<mkdir dir="dependencies/annotations"/>
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_KAnnotator_InferJdkAnnotations/shipWithKotlin.tcbuildtag/kotlin-jdk-annotations.jar"
dest="dependencies/annotations/kotlin-jdk-annotations.jar" usetimestamp="true"/>
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_KAnnotator_InferJdkAnnotations/shipWithKotlin.tcbuildtag/kotlin-android-sdk-annotations.jar"
dest="dependencies/annotations/kotlin-android-sdk-annotations.jar" usetimestamp="true"/>
</target>
<target name="get_android_studio">
<property name="android.version" value="0.4.6"/>
<property name="android.build.version" value="133.1028713"/>
<condition property="android.os.tag" value="windows">
<os family="windows" />
</condition>
<condition property="android.os.tag" value="mac">
<os family="mac" />
</condition>
<condition property="android.os.tag" value="linux">
<and>
<os family="unix" />
<not>
<os family="mac"/>
</not>
</and>
</condition>
<property name="android.file.name" value="android-studio-ide-${android.build.version}-${android.os.tag}.zip" />
<property name="android.studio.url" value="http://dl.google.com/dl/android/studio/ide-zips/${android.version}/${android.file.name}"/>
<property name="android.destination.dir" value="android-studio/sdk" />
<mkdir dir="dependencies/download"/>
<get src="${android.studio.url}" dest="dependencies/download" usetimestamp="true"/>
<delete dir="${android.destination.dir}" failonerror="false" includeemptydirs="true">
<exclude name="config/**"/>
<exclude name="system/**"/>
</delete>
<unzip src="dependencies/download/${android.file.name}" dest="${android.destination.dir}">
<cutdirsmapper dirs="1"/>
</unzip>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<if>
<matches pattern=".+windows\.zip" string="${android.file.name}"/>
<then>
</then>
<elseif>
<matches pattern=".+mac\.zip" string="${android.file.name}"/>
<then>
<exec executable="chmod">
<arg value="a+x"/>
<arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/>
<arg path="${android.destination.dir}/bin/printenv.py"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/>
</exec>
</then>
</elseif>
<elseif>
<matches pattern=".+linux\.zip" string="${android.file.name}"/>
<then>
<exec executable="chmod">
<arg value="a+x"/>
<arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/fsnotifier64"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/>
<arg path="${android.destination.dir}/bin/studio.sh"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/>
</exec>
</then>
</elseif>
<else>
<fail message="File name '${android.file.name}' wasn't matched"/>
</else>
</if>
</target>
</project>