Include different runtime into plugin for bootstrap build

This commit is contained in:
Alexander Udalov
2014-12-16 21:41:36 +03:00
parent ef1fef65c2
commit 51e9675138
4 changed files with 57 additions and 7 deletions
+39 -5
View File
@@ -1,9 +1,21 @@
<project name="Idea Runner" default="force-enable-kotlin-plugin">
<target name="force-enable-kotlin-plugin">
<property name="dependencies.dir" value="${basedir}/../dependencies"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${dependencies.dir}/ant-contrib.jar"/>
<project name="Idea Runner">
<property name="dependencies.dir" location="${basedir}/../dependencies"/>
<property name="bootstrap.build.no.tests" value="false"/>
<condition property="bootstrap.or.local.build" value="true">
<or>
<istrue value="${bootstrap.build.no.tests}"/>
<not>
<isset property="teamcity.version"/>
</not>
</or>
</condition>
<property name="disable_plugins.file.path" value="${basedir}/../ideaSDK/config-idea/disabled_plugins.txt"/>
<property name="bootstrap.runtime" location="${dependencies.dir}/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${dependencies.dir}/ant-contrib.jar"/>
<target name="force-enable-kotlin-plugin">
<property name="disable_plugins.file.path" location="${basedir}/../ideaSDK/config-idea/disabled_plugins.txt"/>
<available property="disable_plugins.found" file="${disable_plugins.file.path}"/>
<if>
@@ -23,4 +35,26 @@
</then>
</if>
</target>
<target name="copy-runtime-for-idea-plugin">
<!-- For local build and the first (bootstrap) step of the build, IDEA plugin needs the runtime it was compiled against -->
<!-- Otherwise (on the second step of the build) we distribute the same runtime in the compiler and the plugin -->
<condition property="runtime.to.copy"
value="${bootstrap.runtime}"
else="${basedir}/../dist/kotlinc/lib/kotlin-runtime.jar">
<isset property="bootstrap.or.local.build"/>
</condition>
<!--suppress AntResolveInspection -->
<copy file="${runtime.to.copy}" tofile="${artifact.output.path}/lib/kotlin-runtime.jar"/>
</target>
<target name="copy-runtime-for-jps-plugin" if="bootstrap.or.local.build">
<!-- For local build and the first (bootstrap) step of the build, JPS plugin needs the runtime it was compiled against -->
<!-- On the second step of the build the runtime from the plugin should be enough (it's included to the classpath in plugin.xml) -->
<!--suppress AntResolveInspection -->
<jar update="true" destfile="${artifact.output.path}/kotlin-jps-plugin.jar">
<zipgroupfileset file="${bootstrap.runtime}"/>
</jar>
</target>
</project>