61 lines
2.7 KiB
XML
61 lines
2.7 KiB
XML
<project name="Kotlin Compiler" default="get_kotlin_bootstrap">
|
|
<property name="teamcity.buildType.id" value="bt345"/>
|
|
|
|
<!--
|
|
Possible options for "kotlin.bootstrap.source":
|
|
- tag - last build marked with tag "bootstrap" will be downloaded. The name of the tag can be changed with "kotlin.bootstrap.tag" property
|
|
- last - last successful build in configuration will be used
|
|
- compiler version (e.g. 0.6.31, 0.6.123)
|
|
-->
|
|
<property name="kotlin.bootstrap.source" value="tag"/>
|
|
<property name="kotlin.bootstrap.tag" value="bootstrap"/>
|
|
<property name="kotlin.bootstrap.buildType.id" value="${teamcity.buildType.id}"/>
|
|
|
|
<property name="kotlin.bootstrap.plugin.dir" value="dependencies/kotlin-bootstrap-plugin"/>
|
|
<property name="kotlin.bootstrap.base.url" value="http://teamcity.jetbrains.com/guestAuth/repository/download/${kotlin.bootstrap.buildType.id}"/>
|
|
|
|
<target name="get_kotlin_bootstrap" depends="set_kotlin_bootstrap_type,get_last_bootstrap_kotlin,get_tagged_bootstrap_kotlin,get_versioned_bootstrap_kotlin" />
|
|
|
|
<target name="set_kotlin_bootstrap_type">
|
|
<condition property="bootstrap.type.isLastBootstrap">
|
|
<equals arg1="last" arg2="${kotlin.bootstrap.source}"/>
|
|
</condition>
|
|
<condition property="bootstrap.type.isTaggedBootstrap">
|
|
<equals arg1="tag" arg2="${kotlin.bootstrap.source}"/>
|
|
</condition>
|
|
<condition property="bootstrap.type.isVersionedBootstrap">
|
|
<not>
|
|
<or>
|
|
<isset property="bootstrap.type.isLastBootstrap" />
|
|
<isset property="bootstrap.type.isTaggedBootstrap" />
|
|
</or>
|
|
</not>
|
|
</condition>
|
|
</target>
|
|
|
|
<target name="get_last_bootstrap_kotlin" if="bootstrap.type.isLastBootstrap">
|
|
<get_kotlin_bootstrap_plugin url="${kotlin.bootstrap.base.url}/.lastSuccessful/kotlin-plugin-%7Bbuild.number%7D.zip"/>
|
|
</target>
|
|
|
|
<target name="get_tagged_bootstrap_kotlin" if="bootstrap.type.isTaggedBootstrap">
|
|
<get_kotlin_bootstrap_plugin url="${kotlin.bootstrap.base.url}/${kotlin.bootstrap.tag}.tcbuildtag/kotlin-plugin-%7Bbuild.number%7D.zip"/>
|
|
</target>
|
|
|
|
<target name="get_versioned_bootstrap_kotlin" if="bootstrap.type.isVersionedBootstrap">
|
|
<get_kotlin_bootstrap_plugin url="${kotlin.bootstrap.base.url}/${kotlin.bootstrap.source}/kotlin-plugin-%7Bbuild.number%7D.zip"/>
|
|
</target>
|
|
|
|
<macrodef name="get_kotlin_bootstrap_plugin">
|
|
<attribute name="url"/>
|
|
<sequential>
|
|
<mkdir dir="dependencies/download"/>
|
|
|
|
<get src="@{url}"
|
|
dest="dependencies/download/kotlin-bootstrap-plugin.zip"
|
|
usetimestamp="false"/>
|
|
|
|
<delete dir="${kotlin.bootstrap.plugin.dir}"/>
|
|
<unzip src="dependencies/download/kotlin-bootstrap-plugin.zip" dest="${kotlin.bootstrap.plugin.dir}"/>
|
|
</sequential>
|
|
</macrodef>
|
|
</project> |