forked from shalupov/idea-cloudformation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
72 lines (61 loc) · 2.76 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
<project name="AWS CloudFormation IDEA Plugin" basedir=".">
<property name="idea.version" value="13" />
<property name="kotlin.version" value="0.7.270" />
<property name="build.number" value="SNAPSHOT_XXX" />
<property name="deps" value="${basedir}/out" />
<mkdir dir="${deps}" />
<target name="fetch.ant.contrib">
<get
src="http://repository.jetbrains.com/remote-repos/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3.jar"
dest="${deps}/ant-contrib-1.0b3.jar"
skipexisting="true"/>
<taskdef resource="net/sf/antcontrib/antlib.xml" classpath="${deps}/ant-contrib-1.0b3.jar"/>
</target>
<target name="fetch.idea" depends="fetch.ant.contrib">
<get
src="http://download.jetbrains.com/idea/ideaIU-${idea.version}.zip"
dest="${deps}/ideaIU-${idea.version}.zip"
skipexisting="true"/>
<outofdate>
<sourcefiles>
<pathelement path="${basedir}/build.xml"/>
<pathelement path="${deps}/ideaIU-${idea.version}.zip"/>
</sourcefiles>
<targetfiles path="${basedir}/out/idea.touch"/>
<sequential>
<delete dir="${deps}/idea"/>
<unzip src="${deps}/ideaIU-${idea.version}.zip" dest="${deps}/idea"/>
<touch file="${basedir}/out/idea.touch"/>
</sequential>
</outofdate>
</target>
<target name="fetch.kotlin" depends="fetch.ant.contrib">
<mkdir dir="${basedir}/out"/>
<get
src="http://teamcity.jetbrains.com/guestAuth/repository/download/bt345/${kotlin.version}/kotlin-plugin-${kotlin.version}.zip"
dest="${deps}/kotlin-plugin-${kotlin.version}.zip"
skipexisting="true"/>
<outofdate>
<sourcefiles>
<pathelement path="${basedir}/build.xml"/>
<pathelement path="${deps}/kotlin-plugin-${kotlin.version}.zip"/>
</sourcefiles>
<targetfiles path="${basedir}/out/kotlin.touch"/>
<sequential>
<delete dir="${deps}/kotlin"/>
<unzip src="${basedir}/out/kotlin-plugin-${kotlin.version}.zip" dest="${deps}/kotlin"/>
<touch file="${basedir}/out/kotlin.touch"/>
</sequential>
</outofdate>
<echo message="##teamcity[setParameter name='teamcity.ideaRunner.additional.lib.path' value='${deps}/kotlin/Kotlin/lib/jps']"/>
<echo message="##teamcity[setParameter name='system.jps.kotlin.home' value='${deps}/kotlin/Kotlin/kotlinc']"/>
<echo message="##teamcity[setParameter name='system.jps.kotlin.extra.annotation.paths' value='${deps}/kotlin/Kotlin/kotlinc/lib/kotlin-jdk-annotations.jar']"/>
</target>
<target name="replace.build.number">
<replace
token="SNAPSHOT"
value="${build.number}"
file="${basedir}/resources/META-INF/plugin.xml" />
</target>
<target name="fetch.dependencies" depends="fetch.ant.contrib,fetch.idea,fetch.kotlin" />
</project>