forked from Kotlin/anko
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate_dependencies.xml
263 lines (213 loc) · 12.5 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
<project name="Update Dependencies" default="update">
<property name="ideaVersion" value="141.175.3"/>
<property name="idea.sdk.fetch.needed" value="true"/>
<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>
<target name="update">
<mkdir dir="lib/download"/>
<get src="http://repo1.maven.org/maven2/org/ow2/asm/asm-debug-all/4.2/asm-debug-all-4.2.jar"
dest="lib/asm-4.2.jar" usetimestamp="true"/>
<get src="http://central.maven.org/maven2/org/zeromq/jeromq/0.3.4/jeromq-0.3.4.jar"
dest="lib/jeromq-0.3.4.jar" usetimestamp="true"/>
<get src="http://repo1.maven.org/maven2/com/google/code/gson/gson/2.3/gson-2.3.jar"
dest="lib/gson-2.3.jar" usetimestamp="true"/>
<get src="http://search.maven.org/remotecontent?filepath=junit/junit/4.11/junit-4.11.jar"
dest="lib/junit-4.11.jar" usetimestamp="true"/>
<get src="http://search.maven.org/remotecontent?filepath=org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar"
dest="lib/hamcrest-all-1.3.jar" usetimestamp="true"/>
<get src="http://search.maven.org/remotecontent?filepath=org/json/json/20080701/json-20080701.jar"
dest="lib/json-20080701.jar" usetimestamp="true"/>
<get src="http://search.maven.org/remotecontent?filepath=org/ccil/cowan/tagsoup/tagsoup/1.2/tagsoup-1.2.jar"
dest="lib/tagsoup-1.2.jar" usetimestamp="true"/>
<get src="http://search.maven.org/remotecontent?filepath=org/robolectric/robolectric/2.4/robolectric-2.4-jar-with-dependencies.jar"
dest="lib/robolectric-with-dependencies.jar" usetimestamp="true"/>
<get src="http://search.maven.org/remotecontent?filepath=org/robolectric/robolectric/2.4/robolectric-2.4-sources.jar"
dest="lib/robolectric-sources.jar" usetimestamp="true"/>
<get src="http://search.maven.org/remotecontent?filepath=org/robolectric/android-all/4.3_r2-robolectric-0/android-all-4.3_r2-robolectric-0.jar"
dest="lib/android-all-4.1.2_r1-robolectric-0.jar" usetimestamp="true"/>
<get src="http://central.maven.org/maven2/com/google/android/support-v4/r6/support-v4-r6.jar"
dest="lib/android-support-v4.jar" usetimestamp="true"/>
<get src="https://github.com/JetBrains/kotlin/releases/download/M11.1-bootstrap/kotlin-plugin-0.11.91.1.zip"
dest="lib/kotlin-plugin.zip" usetimestamp="true"/>
<get src="http://heanet.dl.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip"
dest="lib/download/ant-contrib-1.0b3-bin.zip" usetimestamp="true"/>
<delete file="lib/ant-contrib.jar" failonerror="false"/>
<unzip src="lib/download/ant-contrib-1.0b3-bin.zip" dest="lib">
<patternset>
<include name="ant-contrib/ant-contrib-1.0b3.jar"/>
</patternset>
<mapper type="merge" to="ant-contrib.jar"/>
</unzip>
<execute_update_with_id_resolve
teamcity.server.url="https://teamcity.jetbrains.com"
build.locator.request="buildType:bt410,status:SUCCESS,branch:idea/${ideaVersion}"/>
<delete dir="lib/kotlin-plugin" failonerror="false"/>
<unzip src="lib/kotlin-plugin.zip"
dest="lib/"/>
<set_unix_perms />
</target>
<macrodef name="set_unix_perms">
<sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="lib/ant-contrib.jar"/>
<if>
<equals arg1="${os.tag}" arg2="win.zip"/>
<then />
<else>
<chmod dir="lib/Kotlin/kotlinc/bin" perm="+x" includes="**/*"/>
</else>
</if>
</sequential>
</macrodef>
<macrodef name="execute_update_with_id_resolve">
<attribute name="teamcity.server.url"/>
<attribute name="build.locator.request"/>
<sequential>
<loadresource property="execute.build.id">
<url url="@{teamcity.server.url}/guestAuth/app/rest/builds/?locator=@{build.locator.request}"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex pattern="^(.*)\sid="(\d+)"(.*)$" replace="\2" flags="s"/>
</tokenfilter>
</filterchain>
</loadresource>
<echo message="IDEA build id: ${execute.build.id}"/>
<execute_update base.url="@{teamcity.server.url}/guestAuth/app/rest/builds/id:${execute.build.id}"/>
</sequential>
</macrodef>
<macrodef name="execute_update">
<attribute name="base.url"/>
<sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/lib/ant-contrib.jar"/>
<loadresource property="idea.build.number">
<url url="@{base.url}/artifacts/children"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex pattern="^(.*)ideaIC-([\w\.]+)\.win\.zip(.*)$" replace="\2" flags="s"/>
</tokenfilter>
</filterchain>
</loadresource>
<property name="idea.archive.name" value="ideaIC-${idea.build.number}.${os.tag}"/>
<echo message="IDEA build number: ${idea.build.number}"/>
<echo message="IDEA archive file: ${idea.archive.name}"/>
<property name="content.base.url" value="@{base.url}/artifacts/content"/>
<property name="core" value="ideaSDK/core"/>
<property name="core-analysis" value="ideaSDK/core-analysis"/>
<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-idea/**"/>
<exclude name="system-idea/**"/>
</delete>
<mkdir dir="${core}"/>
<mkdir dir="${core-analysis}"/>
<mkdir dir="${jps}"/>
<mkdir dir="${jps-test}"/>
<get src="${content.base.url}/core/intellij-core.jar" dest="${core}/intellij-core.jar" usetimestamp="true"/>
<get src="${content.base.url}/core/intellij-core-analysis.jar" dest="${core-analysis}/intellij-core-analysis.jar"
usetimestamp="true"/>
<get src="${content.base.url}/core/annotations.jar" dest="${core}/annotations.jar" usetimestamp="true"/>
<get src="${content.base.url}/core/guava-17.0.jar" dest="${core}/guava-17.0.jar" usetimestamp="true"/>
<get src="${content.base.url}/core/picocontainer.jar" dest="${core}/picocontainer.jar" usetimestamp="true"/>
<get src="${content.base.url}/core/trove4j.jar" dest="${core}/trove4j.jar" usetimestamp="true"/>
<!--<get src="${content.base.url}/core/snappy-java-1.0.5.jar" dest="${core}/snappy-java-1.0.5.jar" usetimestamp="true"/>-->
<get src="${content.base.url}/jps/standalone-jps-IC-${idea.build.number}.zip"
dest="lib/download/standalone-jps.zip"
usetimestamp="true"/>
<property name="jps.extracted.dir" value="lib/download/standalone-jps"/>
<unzip src="lib/download/standalone-jps.zip" dest="${jps.extracted.dir}"/>
<copy todir="${jps}" flatten="true">
<resources>
<file file="${jps.extracted.dir}/groovy-jps-plugin.jar"/>
<file file="${jps.extracted.dir}/groovy_rt.jar"/>
<file file="${jps.extracted.dir}/jdom.jar"/>
<file file="${jps.extracted.dir}/jgoodies-forms.jar"/>
<file file="${jps.extracted.dir}/jna.jar"/>
<file file="${jps.extracted.dir}/jps-builders.jar"/>
<file file="${jps.extracted.dir}/jps-model.jar"/>
<file file="${jps.extracted.dir}/log4j.jar"/>
<file file="${jps.extracted.dir}/nanoxml-2.2.3.jar"/>
<file file="${jps.extracted.dir}/protobuf-2.5.0.jar"/>
<file file="${jps.extracted.dir}/trove4j.jar"/>
<file file="${jps.extracted.dir}/ui-designer-jps-plugin.jar"/>
<file file="${jps.extracted.dir}/util.jar"/>
</resources>
</copy>
<get src="${content.base.url}/jps/jps-build-test-IC-${idea.build.number}.jar" dest="${jps-test}/jps-build-test.jar"
usetimestamp="true"/>
<get src="${content.base.url}/${idea.archive.name}" dest="lib/download/${idea.archive.name}" usetimestamp="true"/>
<delete file="lib/download/idea-sdk-sources.zip" failonerror="false"/>
<get src="${content.base.url}/sources.zip" dest="lib/download/idea-sdk-sources.zip" usetimestamp="true"/>
</then>
</if>
<if>
<matches pattern=".+\.win\.zip" string="${idea.archive.name}"/>
<then>
<unzip src="lib/download/${idea.archive.name}" dest="ideaSDK"/>
</then>
<elseif>
<matches pattern=".+\.mac\.zip" string="${idea.archive.name}"/>
<then>
<unzip src="lib/download/${idea.archive.name}" dest="ideaSDK">
<cutdirsmapper dirs="2"/>
</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="lib/download/${idea.archive.name}" 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="lib/download/idea-sdk-sources.zip" tofile="ideaSDK/sources/sources.zip" overwrite="true"/>
<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="ideaSDK/lib/asm-all.jar" todir="${core}"/>
<!-- 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"/>
</sequential>
</macrodef>
</project>