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
+6 -1
View File
@@ -1,6 +1,12 @@
<component name="ArtifactManager">
<artifact name="KotlinBarePlugin">
<output-path>$PROJECT_DIR$/out/artifacts/BareKotlin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-idea-plugin</target>
</options>
</properties>
<root id="root">
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
@@ -16,7 +22,6 @@
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-runtime.jar" />
</element>
</root>
</artifact>
+6
View File
@@ -1,6 +1,12 @@
<component name="ArtifactManager">
<artifact type="jar" name="KotlinJpsPlugin">
<output-path>$PROJECT_DIR$/out/artifacts/KotlinJpsPlugin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-jps-plugin</target>
</options>
</properties>
<root id="archive" name="kotlin-jps-plugin.jar">
<element id="directory" name="META-INF">
<element id="dir-copy" path="$PROJECT_DIR$/jps-plugin/src/META-INF" />
+6 -1
View File
@@ -1,6 +1,12 @@
<component name="ArtifactManager">
<artifact name="KotlinPlugin">
<output-path>$PROJECT_DIR$/out/artifacts/Kotlin</output-path>
<properties id="ant-postprocessing">
<options enabled="true">
<file>file://$PROJECT_DIR$/idea-runner/runner.xml</file>
<target>copy-runtime-for-idea-plugin</target>
</options>
</properties>
<root id="root">
<element id="directory" name="lib">
<element id="archive" name="kotlin-plugin.jar">
@@ -37,7 +43,6 @@
<element id="directory" name="jps">
<element id="artifact" artifact-name="KotlinJpsPlugin" />
</element>
<element id="file-copy" path="$PROJECT_DIR$/dist/kotlinc/lib/kotlin-runtime.jar" />
</element>
<element id="directory" name="kotlinc">
<element id="dir-copy" path="$PROJECT_DIR$/dist/kotlinc" />
+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>