Remove obsolete ant build scripts

This commit is contained in:
Ilya Gorbunov
2018-04-18 06:27:26 +03:00
parent 48984fb3bf
commit b1f6ba703d
7 changed files with 1 additions and 401 deletions
Generated
-5
View File
@@ -1,13 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="AntConfiguration"> <component name="AntConfiguration">
<buildFile url="file://$PROJECT_DIR$/idea-runner/runner.xml" />
<buildFile url="file://$PROJECT_DIR$/libraries/build-docs.xml"> <buildFile url="file://$PROJECT_DIR$/libraries/build-docs.xml">
<maximumHeapSize value="1024" /> <maximumHeapSize value="1024" />
<properties>
<property name="dokka.path" value="../../dokka" />
</properties>
</buildFile> </buildFile>
<buildFile url="file://$PROJECT_DIR$/TeamCityRelay.xml" />
</component> </component>
</project> </project>
-92
View File
@@ -1,92 +0,0 @@
<project name="Change plugins version" default="change-version">
<property name="relay.origin.version" value="1.0.0-beta-2423"/>
<property name="relay.substitute.version" value="1.0.0-beta-2423-IJ-141-3"/>
<property name="relay.plugins.dir" value="artifacts"/>
<property name="relay.unpack.directory" value="relay-dir"/>
<macrodef name="substituteRegexpInFile">
<attribute name="src.file"/>
<attribute name="output.dir"/>
<attribute name="origin.version"/>
<attribute name="substituted.version"/>
<sequential>
<copy todir="@{output.dir}">
<fileset file="@{src.file}"/>
<filterchain>
<replaceregex pattern="@{origin.version}" replace="@{substituted.version}" />
</filterchain>
</copy>
</sequential>
</macrodef>
<macrodef name="substitudeVersionInPlugin">
<attribute name="plugin.path"/>
<attribute name="plugin.jar.name"/>
<attribute name="origin.version"/>
<attribute name="substituted.version"/>
<attribute name="plugin.subdir"/>
<attribute name="output-dir" default="@{substituted.version}"/>
<attribute name="output.plugin.file.name" default="@{plugin.jar.name}-@{substituted.version}.zip"/>
<attribute name="temp.origin.dir" default="${relay.unpack.directory}/@{plugin.jar.name}/plugin-origin"/>
<attribute name="temp.substitute.dir" default="${relay.unpack.directory}/@{plugin.jar.name}/substitute"/>
<sequential>
<delete dir="${relay.unpack.directory}/@{plugin.jar.name}"/>
<mkdir dir="${relay.unpack.directory}/@{plugin.jar.name}"/>
<unzip src="@{plugin.path}" dest="@{temp.origin.dir}">
<patternset>
<include name="**/lib/@{plugin.jar.name}.jar" />
</patternset>
<flattenmapper/>
</unzip>
<unzip src="@{temp.origin.dir}/@{plugin.jar.name}.jar" dest="@{temp.origin.dir}">
<patternset>
<include name="**/META-INF/plugin.xml" />
</patternset>
<flattenmapper/>
</unzip>
<substituteRegexpInFile
src.file="@{temp.origin.dir}/plugin.xml" output.dir="@{temp.substitute.dir}"
origin.version="@{origin.version}" substituted.version="@{substituted.version}"/>
<!-- Copy updated file back into jar -->
<copy file="@{temp.origin.dir}/@{plugin.jar.name}.jar" todir="@{temp.substitute.dir}"/>
<jar destfile="@{temp.substitute.dir}/@{plugin.jar.name}.jar" update="true">
<zipfileset file="@{temp.substitute.dir}/plugin.xml" prefix="META-INF"/>
</jar>
<!-- Pack updated plugin.jar back to zip file -->
<copy file="@{plugin.path}" tofile="@{substituted.version}/@{output.plugin.file.name}"/>
<zip destfile="@{substituted.version}/@{output.plugin.file.name}" update="true">
<zipfileset file="@{temp.substitute.dir}/@{plugin.jar.name}.jar" prefix="@{plugin.subdir}/lib"/>
</zip>
</sequential>
</macrodef>
<target name="change-version" description="Repack plugin with other version">
<delete dir="${relay.unpack.directory}"/>
<delete dir="${relay.substitute.version}"/>
<mkdir dir="${relay.unpack.directory}"/>
<mkdir dir="${relay.substitute.version}"/>
<substitudeVersionInPlugin
plugin.jar.name="kotlin-plugin"
plugin.path="${relay.plugins.dir}/kotlin-plugin-${relay.origin.version}.zip"
origin.version="${relay.origin.version}"
plugin.subdir="Kotlin"
substituted.version="${relay.substitute.version}"/>
<substitudeVersionInPlugin
plugin.jar.name="kotlin-android-extensions"
plugin.path="${relay.plugins.dir}/kotlin-android-extensions-plugin-${relay.origin.version}.zip"
origin.version="${relay.origin.version}"
plugin.subdir="KotlinAndroidExtensions"
substituted.version="${relay.substitute.version}"/>
</target>
</project>
-29
View File
@@ -1,29 +0,0 @@
<project name="Commons">
<condition property="isWindows">
<os family="windows"/>
</condition>
<condition property="isMac">
<os family="mac"/>
</condition>
<condition property="isLinux">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<property name="dependencies" value="${basedir}/dependencies"/>
<property name="output" value="${basedir}/dist"/>
<property name="js.stdlib.output.dir" value="${output}/js"/>
<target name="make-dependency-dirs">
<mkdir dir="${dependencies}"/>
<mkdir dir="${dependencies}/download"/>
</target>
</project>
-179
View File
@@ -1,179 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="download_android_sdk" default="download_android_sdk" xmlns:unless="ant:unless">
<property name="android.sdk.dir" value="dependencies/androidSDK"/>
<property name="download.dir" value="dependencies/download"/>
<condition property="tools.os" value="windows">
<os family="windows"/>
</condition>
<condition property="tools.isWindows" value="true">
<os family="windows"/>
</condition>
<condition property="tools.os" value="macosx">
<os family="mac"/>
</condition>
<condition property="tools.os" value="linux">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<target name="download_android_sdk">
<delete dir="${android.sdk.dir}" failonerror="false" />
<mkdir dir="${download.dir}"/>
<mkdir dir="${android.sdk.dir}"/>
<mkdir dir="${android.sdk.dir}/platforms"/>
<mkdir dir="${android.sdk.dir}/build-tools"/>
<download_android_platform android.versioncode="23_r01" android.sdk.version="23" android.full.version="6.0" />
<download_android_platform_new android.versioncode="26_r02" android.sdk.version="26" android.full.version="8.0.0" />
<download_support_repository android.repo.version="44" android.repo.last="25.2.0"/>
<download_platform_tools android.platform.tools.version="25.0.3" />
<download_tools android.tools.version="24.3.4" />
<download_build_tools android.build.tools.version="23.0.1" android.build.tools.full.version="6.0" />
</target>
<target name="download_sources">
<delete dir="${android.sdk.dir}" failonerror="false" />
<mkdir dir="${download.dir}"/>
<mkdir dir="${android.sdk.dir}"/>
<mkdir dir="${android.sdk.dir}/platforms"/>
<mkdir dir="${android.sdk.dir}/build-tools"/>
<download_sources android.sources.versioncode="21_r01" android.sources.version="21" />
</target>
<macrodef name="download_android_platform">
<attribute name="android.versioncode" />
<attribute name="android.sdk.version" />
<attribute name="android.full.version" />
<sequential>
<get src="http://dl-ssl.google.com/android/repository/android-@{android.versioncode}.zip"
dest="${download.dir}/android-platform-@{android.versioncode}.zip" usetimestamp="true"/>
<unzip src="${download.dir}/android-platform-@{android.versioncode}.zip" dest="${android.sdk.dir}/platforms"/>
<move file="${android.sdk.dir}/platforms/android-@{android.full.version}" tofile="${android.sdk.dir}/platforms/android-@{android.sdk.version}"/>
<delete dir="${android.sdk.dir}/platforms/android-@{android.full.version}"/>
</sequential>
</macrodef>
<macrodef name="download_android_platform_new">
<attribute name="android.versioncode" />
<attribute name="android.sdk.version" />
<attribute name="android.full.version" />
<sequential>
<get src="http://dl-ssl.google.com/android/repository/platform-@{android.versioncode}.zip"
dest="${download.dir}/android-platform-@{android.versioncode}.zip" usetimestamp="true"/>
<unzip src="${download.dir}/android-platform-@{android.versioncode}.zip" dest="${android.sdk.dir}/platforms"/>
<move file="${android.sdk.dir}/platforms/android-@{android.full.version}" tofile="${android.sdk.dir}/platforms/android-@{android.sdk.version}"/>
<delete dir="${android.sdk.dir}/platforms/android-@{android.full.version}"/>
</sequential>
</macrodef>
<macrodef name="download_platform_tools">
<attribute name="android.platform.tools.version" />
<sequential>
<get src="http://dl-ssl.google.com/android/repository/platform-tools_r@{android.platform.tools.version}-${tools.os}.zip"
dest="${download.dir}/android-platform-tools_r@{android.platform.tools.version}.zip" usetimestamp="true"/>
<unzip src="${download.dir}/android-platform-tools_r@{android.platform.tools.version}.zip" dest="${android.sdk.dir}"/>
</sequential>
</macrodef>
<macrodef name="download_tools">
<attribute name="android.tools.version" />
<sequential>
<get src="http://dl.google.com/android/repository/tools_r@{android.tools.version}-${tools.os}.zip"
dest="${download.dir}/android-tools_r@{android.tools.version}.zip" usetimestamp="true"/>
<unzip src="${download.dir}/android-tools_r@{android.tools.version}.zip" dest="${android.sdk.dir}"/>
</sequential>
</macrodef>
<macrodef name="download_build_tools">
<attribute name="android.build.tools.version" />
<attribute name="android.build.tools.full.version" />
<sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="lib/ant-contrib.jar"/>
<get src="http://dl.google.com/android/repository/build-tools_r@{android.build.tools.version}-${tools.os}.zip"
dest="${download.dir}/android-build-tools_r@{android.build.tools.version}.zip" usetimestamp="true"/>
<unzip src="${download.dir}/android-build-tools_r@{android.build.tools.version}.zip" dest="${android.sdk.dir}/build-tools"/>
<move file="${android.sdk.dir}/build-tools/android-@{android.build.tools.full.version}"
tofile="${android.sdk.dir}/build-tools/@{android.build.tools.version}"/>
<sequential unless:set="tools.isWindows">
<exec executable="chmod">
<arg value="a+x"/>
<arg path="${android.sdk.dir}/build-tools/@{android.build.tools.version}/aapt"/>
<arg path="${android.sdk.dir}/build-tools/@{android.build.tools.version}/aidl"/>
<arg path="${android.sdk.dir}/build-tools/@{android.build.tools.version}/dx"/>
<arg path="${android.sdk.dir}/build-tools/@{android.build.tools.version}/zipalign"/>
<arg path="${android.sdk.dir}/tools/android"/>
</exec>
</sequential>
</sequential>
</macrodef>
<macrodef name="download_support_repository">
<attribute name="android.repo.version" />
<attribute name="android.repo.last" />
<sequential>
<get src="http://dl-ssl.google.com/android/repository/android_m2repository_r@{android.repo.version}.zip"
dest="${download.dir}/android_m2repository_r@{android.repo.version}.zip" usetimestamp="true"/>
<mkdir dir="${android.sdk.dir}/extras/android" />
<unzip src="${download.dir}/android_m2repository_r@{android.repo.version}.zip" dest="${android.sdk.dir}/extras/android"/>
<unzip
src="${android.sdk.dir}/extras/android/m2repository/com/android/support/appcompat-v7/@{android.repo.last}/appcompat-v7-@{android.repo.last}.aar"
dest="${android.sdk.dir}/support/appcompat-v7" />
<unzip
src="${android.sdk.dir}/extras/android/m2repository/com/android/support/support-v4/@{android.repo.last}/support-v4-@{android.repo.last}.aar"
dest="${android.sdk.dir}/support/support-v4" />
</sequential>
</macrodef>
<macrodef name="download_sources">
<attribute name="android.sources.versioncode" />
<attribute name="android.sources.version" />
<sequential>
<get src="http://dl-ssl.google.com/android/repository/sources-@{android.sources.versioncode}.zip"
dest="${download.dir}/android_sources_@{android.sources.versioncode}.zip" usetimestamp="true"/>
<mkdir dir="${android.sdk.dir}/sources/android-@{android.sources.version}" />
<unzip src="${download.dir}/android_sources_@{android.sources.versioncode}.zip"
dest="${android.sdk.dir}/sources"/>
<move file="${android.sdk.dir}/sources/src"
tofile="${android.sdk.dir}/sources/android-@{android.sources.version}"/>
</sequential>
</macrodef>
</project>
-64
View File
@@ -1,64 +0,0 @@
<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">
<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}/../build/dist/kotlinc/lib/kotlin-runtime.jar">
<isset property="bootstrap.or.local.build"/>
</condition>
<condition property="reflect.to.copy"
value="${bootstrap.reflect}"
else="${basedir}/../build/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>
-21
View File
@@ -2,24 +2,3 @@
This project is a part of **Kotlin IntelliJ IDEA Plugin** This project is a part of **Kotlin IntelliJ IDEA Plugin**
which provides support for Ultimate IDEA features from Kotlin side. which provides support for Ultimate IDEA features from Kotlin side.
If you want to work on this project you should open it in IDEA as separate project.
## Build
To build this project:
1. Run `ant -f update_dependencies.xml` in **kotlin-ultimate** folder.
2. Build main Kotlin project itself.
3. Build **kotlin-ultimate** project.
## Build a plugin
If you want to build a **Kotlin IntelliJ IDEA Plugin** locally
with ultimate features support you should:
1. Build kotlin plugin in main project: **Build -> Build Artifacts -> Kotlin Plugin -> Build**.
2. Run `ant -f build.xml` in **kotlin-ultimate** folder.
Then you will get kotlin-plugin with ultimate features in `ultimate/out/artifacts/Kotlin` folder.
And then you can move/copy/symlink `ultimate/out/artifacts/Kotlin` to the IDEA config: `config/plugins/Kotlin`.
-10
View File
@@ -1,10 +0,0 @@
<project name="Update Ultimate Dependencies" default="update">
<!-- not needed anymore, keeping temporarily for TC build configs compatibility -->
<target name="fetch-extras">
</target>
<target name="fetch-third-party" depends="fetch-extras"/>
<target name="update" depends="fetch-extras"/>
</project>