blob: 171b40181b00b37cbca858089c2a3f4077569693 [file] [log] [blame] [edit]
<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="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>
<isset property="disable_plugins.found"/>
<then>
<!--suppress AntResolveInspection -->
<loadfile property="disabled_plugins.text" srcFile="${disable_plugins.file.path}">
<filterchain>
<linecontains negate="true">
<contains value="org.jetbrains.kotlin"/>
</linecontains>
</filterchain>
</loadfile>
<property name="disabled_plugins.text" value=""/>
<echo file="${disable_plugins.file.path}" message="${disabled_plugins.text}"/>
</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>