| <project name="Idea Runner" xmlns:if="ant:if"> |
| <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"/> |
| <property name="bootstrap.reflect" location="${dependencies.dir}/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-reflect.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}"/> |
| |
| <sequential if:set="disable_plugins.found"> |
| <!--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}"/> |
| </sequential> |
| </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> |
| |
| <condition property="reflect.to.copy" |
| value="${bootstrap.reflect}" |
| else="${basedir}/../dist/kotlinc/lib/kotlin-reflect.jar"> |
| <isset property="bootstrap.or.local.build"/> |
| </condition> |
| |
| <!--suppress AntResolveInspection --> |
| <copy file="${runtime.to.copy}" tofile="${artifact.output.path}/lib/kotlin-runtime.jar" overwrite="true"/> |
| <!--suppress AntResolveInspection --> |
| <copy file="${reflect.to.copy}" tofile="${artifact.output.path}/lib/kotlin-reflect.jar" overwrite="true"/> |
| </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}"/> |
| <zipgroupfileset file="${bootstrap.reflect}"/> |
| </jar> |
| </target> |
| </project> |