remove usages of ant-contrib from Ant build scripts

This commit is contained in:
Dmitry Jemerov
2015-07-30 15:42:08 +02:00
parent 0e25a5ea82
commit 8ef5adb5bd
4 changed files with 411 additions and 461 deletions
+19 -23
View File
@@ -1,4 +1,4 @@
<project name="Jet CI Steps" default="none"> <project name="Kotlin CI Steps" default="none">
<import file="build.xml" optional="false"/> <import file="build.xml" optional="false"/>
<import file="replicate_versions.xml" optional="false"/> <import file="replicate_versions.xml" optional="false"/>
@@ -170,7 +170,7 @@
<print-file-size-statistic path="${output}" file-name="stdlib.meta.js"/> <print-file-size-statistic path="${output}" file-name="stdlib.meta.js"/>
</target> </target>
<target name="post_build" depends="zipArtifacts, revertTemplateFiles, printStatistics, remove_internal_artifacts"/> <target name="post_build" depends="zipArtifacts, revertTemplateFiles, printStatistics, remove_internal_artifacts, dont_remove_internal_artifacts"/>
<target name="none"> <target name="none">
<fail message="Either specify pre_build or post_build"/> <fail message="Either specify pre_build or post_build"/>
@@ -187,27 +187,23 @@
</and> </and>
</condition> </condition>
<target name="remove_internal_artifacts" description="Remove internal artifacts for rr/* branches, but store them for rr/internal/*"> <target name="remove_internal_artifacts" description="Remove internal artifacts for rr/* branches, but store them for rr/internal/*" if="need.remove.artifacts">
<if> <echo message="Remove internal artifacts" />
<istrue value="${need.remove.artifacts}"/>
<then>
<echo message="Remove internal artifacts" />
<delete failonerror="false" verbose="true"> <delete failonerror="false" verbose="true">
<fileset dir="dist"> <fileset dir="dist">
<include name="kotlin-compiler-before-shrink.jar"/> <include name="kotlin-compiler-before-shrink.jar"/>
<include name="kotlin-for-upsource.jar"/> <include name="kotlin-for-upsource.jar"/>
<include name="kotlin-for-upsource-sources.jar"/> <include name="kotlin-for-upsource-sources.jar"/>
<include name="kotlin-test-data.zip"/> <include name="kotlin-test-data.zip"/>
</fileset> </fileset>
<fileset dir="out/artifacts/internal"> <fileset dir="out/artifacts/internal">
<include name="kotlin-ide-common.jar"/> <include name="kotlin-ide-common.jar"/>
</fileset> </fileset>
</delete> </delete>
</then> </target>
<else>
<echo message="Internal artifacts left untouched"/> <target name="dont_remove_internal_artifacts" unless="need.remove.artifacts">
</else> <echo message="Internal artifacts left untouched"/>
</if>
</target> </target>
</project> </project>
+53 -65
View File
@@ -1,4 +1,4 @@
<project name="Kotlin" default="dist"> <project name="Kotlin" default="dist" xmlns:if="ant:if" xmlns:unless="ant:unless">
<include file="jslib_files.xml" /> <include file="jslib_files.xml" />
<property file="resources/kotlinManifest.properties"/> <property file="resources/kotlinManifest.properties"/>
@@ -68,7 +68,6 @@
</path> </path>
<typedef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${bootstrap.compiler.home}/lib/kotlin-ant.jar"/> <typedef resource="org/jetbrains/kotlin/ant/antlib.xml" classpath="${bootstrap.compiler.home}/lib/kotlin-ant.jar"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${dependencies.dir}/ant-contrib.jar"/>
<path id="javac2.classpath"> <path id="javac2.classpath">
<pathelement location="${idea.sdk}/lib/javac2.jar"/> <pathelement location="${idea.sdk}/lib/javac2.jar"/>
@@ -171,22 +170,20 @@
<chmod dir="${kotlin-home}/bin" excludes="**/*.bat" perm="755"/> <chmod dir="${kotlin-home}/bin" excludes="**/*.bat" perm="755"/>
<if> <sequential if:true="${bootstrap.or.local.build}">
<istrue value="${bootstrap.or.local.build}"/> <copy file="${bootstrap.runtime}" tofile="${kotlin-home}/lib/kotlin-runtime-internal-bootstrap.jar"/>
<then> <copy file="${bootstrap.reflect}" tofile="${kotlin-home}/lib/kotlin-reflect-internal-bootstrap.jar"/>
<copy file="${bootstrap.runtime}" tofile="${kotlin-home}/lib/kotlin-runtime-internal-bootstrap.jar"/> <jar destfile="${kotlin-home}/lib/kotlin-reflect-internal-bootstrap.jar" update="true">
<copy file="${bootstrap.reflect}" tofile="${kotlin-home}/lib/kotlin-reflect-internal-bootstrap.jar"/> <manifest>
<jar destfile="${kotlin-home}/lib/kotlin-reflect-internal-bootstrap.jar" update="true"> <attribute name="Class-Path" value="kotlin-runtime-internal-bootstrap.jar"/>
<manifest> </manifest>
<attribute name="Class-Path" value="kotlin-runtime-internal-bootstrap.jar"/> </jar>
</manifest> </sequential>
</jar>
</then> <sequential unless:true="${bootstrap.or.local.build}">
<else> <copy file="${bootstrap.runtime}" todir="${kotlin-home}/lib"/>
<copy file="${bootstrap.runtime}" todir="${kotlin-home}/lib"/> <copy file="${bootstrap.reflect}" todir="${kotlin-home}/lib"/>
<copy file="${bootstrap.reflect}" todir="${kotlin-home}/lib"/> </sequential>
</else>
</if>
</target> </target>
<target name="compiler-sources"> <target name="compiler-sources">
@@ -226,42 +223,38 @@
</manifest> </manifest>
</jar> </jar>
<if> <sequential if:true="${generate.javadoc}">
<istrue value="${generate.javadoc}"/> <delete dir="${output}/kotlin-compiler-javadoc" failonerror="false"/>
<javadoc destdir="${output}/kotlin-compiler-javadoc"
sourcepathref="compilerSources.path"
classpathref="classpath"
linksource="yes"
windowtitle="${manifest.impl.title.kotlin.compiler}"/>
<jar jarfile="${output}/kotlin-compiler-javadoc.jar">
<fileset dir="${output}/kotlin-compiler-javadoc"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<then> <manifest>
<delete dir="${output}/kotlin-compiler-javadoc" failonerror="false"/> <attribute name="Built-By" value="${manifest.impl.vendor}"/>
<javadoc destdir="${output}/kotlin-compiler-javadoc"
sourcepathref="compilerSources.path"
classpathref="classpath"
linksource="yes"
windowtitle="${manifest.impl.title.kotlin.compiler}"/>
<jar jarfile="${output}/kotlin-compiler-javadoc.jar">
<fileset dir="${output}/kotlin-compiler-javadoc"/>
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
<manifest> <attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Built-By" value="${manifest.impl.vendor}"/> <attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.javadoc}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</sequential>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/> <sequential unless:true="${generate.javadoc}">
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.javadoc}"/> <jar jarfile="${output}/kotlin-compiler-javadoc.jar">
<attribute name="Implementation-Version" value="${build.number}"/> <manifest>
</manifest> <attribute name="Built-By" value="${manifest.impl.vendor}"/>
</jar>
</then>
<else> <attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<jar jarfile="${output}/kotlin-compiler-javadoc.jar"> <attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.javadoc}"/>
<manifest> <attribute name="Implementation-Version" value="${build.number}"/>
<attribute name="Built-By" value="${manifest.impl.vendor}"/> </manifest>
</jar>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/> </sequential>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler.javadoc}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
</manifest>
</jar>
</else>
</if>
</target> </target>
<macrodef name="new-kotlin2js"> <macrodef name="new-kotlin2js">
@@ -511,24 +504,19 @@
<delete file="${kotlin-home}/lib/kotlin-compiler.jar" failonerror="false"/> <delete file="${kotlin-home}/lib/kotlin-compiler.jar" failonerror="false"/>
<if> <copy file="${output}/kotlin-compiler-before-shrink.jar"
<isfalse value="${shrink}"/> tofile="${kotlin-home}/lib/kotlin-compiler.jar"
unless:true="${shrink}" />
<then> <sequential if:true="${shrink}">
<copy file="${output}/kotlin-compiler-before-shrink.jar" <available property="rtjar" value="${java.home}/lib/rt.jar" file="${java.home}/lib/rt.jar"/>
tofile="${kotlin-home}/lib/kotlin-compiler.jar"/> <available property="rtjar" value="${java.home}/../Classes/classes.jar" file="${java.home}/../Classes/classes.jar"/>
</then>
<else> <available property="jssejar" value="${java.home}/lib/jsse.jar" file="${java.home}/lib/jsse.jar"/>
<available property="rtjar" value="${java.home}/lib/rt.jar" file="${java.home}/lib/rt.jar"/> <available property="jssejar" value="${java.home}/../Classes/jsse.jar" file="${java.home}/../Classes/jsse.jar"/>
<available property="rtjar" value="${java.home}/../Classes/classes.jar" file="${java.home}/../Classes/classes.jar"/>
<available property="jssejar" value="${java.home}/lib/jsse.jar" file="${java.home}/lib/jsse.jar"/> <proguard configuration="${basedir}/compiler/compiler.pro"/>
<available property="jssejar" value="${java.home}/../Classes/jsse.jar" file="${java.home}/../Classes/jsse.jar"/> </sequential>
<proguard configuration="${basedir}/compiler/compiler.pro"/>
</else>
</if>
<jar jarfile="${output}/kotlin-compiler-for-maven.jar"> <jar jarfile="${output}/kotlin-compiler-for-maven.jar">
<!-- TODO: don't include both to the jar: it's impossible to test changes to core in the local maven build without bootstrap --> <!-- TODO: don't include both to the jar: it's impossible to test changes to core in the local maven build without bootstrap -->
+13 -18
View File
@@ -1,4 +1,4 @@
<project name="Idea Runner"> <project name="Idea Runner" xmlns:if="ant:if">
<property name="dependencies.dir" location="${basedir}/../dependencies"/> <property name="dependencies.dir" location="${basedir}/../dependencies"/>
<property name="bootstrap.build.no.tests" value="false"/> <property name="bootstrap.build.no.tests" value="false"/>
<condition property="bootstrap.or.local.build" value="true"> <condition property="bootstrap.or.local.build" value="true">
@@ -13,28 +13,23 @@
<property name="bootstrap.runtime" location="${dependencies.dir}/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"/> <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"/> <property name="bootstrap.reflect" location="${dependencies.dir}/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-reflect.jar"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${dependencies.dir}/ant-contrib.jar"/>
<target name="force-enable-kotlin-plugin"> <target name="force-enable-kotlin-plugin">
<property name="disable_plugins.file.path" location="${basedir}/../ideaSDK/config-idea/disabled_plugins.txt"/> <property name="disable_plugins.file.path" location="${basedir}/../ideaSDK/config-idea/disabled_plugins.txt"/>
<available property="disable_plugins.found" file="${disable_plugins.file.path}"/> <available property="disable_plugins.found" file="${disable_plugins.file.path}"/>
<if> <sequential if:set="disable_plugins.found">
<isset property="disable_plugins.found"/> <!--suppress AntResolveInspection -->
<then> <loadfile property="disabled_plugins.text" srcFile="${disable_plugins.file.path}">
<!--suppress AntResolveInspection --> <filterchain>
<loadfile property="disabled_plugins.text" srcFile="${disable_plugins.file.path}"> <linecontains negate="true">
<filterchain> <contains value="org.jetbrains.kotlin"/>
<linecontains negate="true"> </linecontains>
<contains value="org.jetbrains.kotlin"/> </filterchain>
</linecontains> </loadfile>
</filterchain> <property name="disabled_plugins.text" value=""/>
</loadfile>
<property name="disabled_plugins.text" value=""/>
<echo file="${disable_plugins.file.path}" message="${disabled_plugins.text}"/> <echo file="${disable_plugins.file.path}" message="${disabled_plugins.text}"/>
</then> </sequential>
</if>
</target> </target>
<target name="copy-runtime-for-idea-plugin"> <target name="copy-runtime-for-idea-plugin">
+326 -355
View File
@@ -1,4 +1,4 @@
<project name="Update Dependencies" default="update"> <project name="Update Dependencies" default="update" xmlns:if="ant:if" xmlns:unless="ant:unless">
<property name="ideaVersion" value="142.3371.3"/> <property name="ideaVersion" value="142.3371.3"/>
<property name="kotlin.bootstrap.locator" value="buildType:bt345,tag:bootstrap,status:SUCCESS"/> <property name="kotlin.bootstrap.locator" value="buildType:bt345,tag:bootstrap,status:SUCCESS"/>
@@ -109,23 +109,16 @@
<attribute name="download" default="dependencies/download"/> <attribute name="download" default="dependencies/download"/>
<attribute name="dependencies" default="dependencies"/> <attribute name="dependencies" default="dependencies"/>
<sequential> <sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/> <sequential if:true="@{bin}">
<if> <get src="@{server}/@{path}.jar" dest="@{download}/@{jar.name.base}.jar" usetimestamp="true"/>
<istrue value="@{bin}"/> <copy file="@{download}/@{jar.name.base}.jar" tofile="@{dependencies}/@{target.jar.name.base}.jar" overwrite="true"/>
<then> </sequential>
<get src="@{server}/@{path}.jar" dest="@{download}/@{jar.name.base}.jar" usetimestamp="true"/>
<copy file="@{download}/@{jar.name.base}.jar" tofile="@{dependencies}/@{target.jar.name.base}.jar" overwrite="true"/>
</then>
</if>
<if> <sequential if:true="@{src}">
<istrue value="@{src}"/> <get src="@{server}/@{path}-sources.jar" dest="@{download}/@{jar.name.base}-sources.jar" usetimestamp="true"/>
<then> <copy file="@{download}/@{jar.name.base}-sources.jar" tofile="@{dependencies}/@{target.jar.name.base}-sources.jar"
<get src="@{server}/@{path}-sources.jar" dest="@{download}/@{jar.name.base}-sources.jar" usetimestamp="true"/> overwrite="true"/>
<copy file="@{download}/@{jar.name.base}-sources.jar" tofile="@{dependencies}/@{target.jar.name.base}-sources.jar" </sequential>
overwrite="true"/>
</then>
</if>
</sequential> </sequential>
</macrodef> </macrodef>
@@ -149,18 +142,6 @@
<mkdir dir="dependencies"/> <mkdir dir="dependencies"/>
<mkdir dir="dependencies/download"/> <mkdir dir="dependencies/download"/>
<!-- ant contrib -->
<get src="http://heanet.dl.sourceforge.net/project/ant-contrib/ant-contrib/1.0b3/ant-contrib-1.0b3-bin.zip"
dest="dependencies/download/ant-contrib-1.0b3-bin.zip" usetimestamp="true"/>
<delete file="dependencies/ant-contrib.jar" failonerror="false"/>
<unzip src="dependencies/download/ant-contrib-1.0b3-bin.zip" dest="dependencies">
<patternset>
<include name="ant-contrib/ant-contrib-1.0b3.jar"/>
</patternset>
<mapper type="merge" to="ant-contrib.jar"/>
</unzip>
<!-- ProGuard --> <!-- ProGuard -->
<get-maven-library prefix="net/sf/proguard" lib="proguard-base" version="5.1" target.jar.name.base="proguard" src="false"/> <get-maven-library prefix="net/sf/proguard" lib="proguard-base" version="5.1" target.jar.name.base="proguard" src="false"/>
<get-maven-library prefix="net/sf/proguard" lib="proguard-anttask" version="5.1" target.jar.name.base="proguard-anttask" src="false"/> <get-maven-library prefix="net/sf/proguard" lib="proguard-anttask" version="5.1" target.jar.name.base="proguard-anttask" src="false"/>
@@ -248,10 +229,8 @@
<mapper type="flatten"/> <mapper type="flatten"/>
</unzip> </unzip>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/> <local name="download.bootstrap.compiler"/>
<condition property="download.bootstrap.compiler">
<!-- Bootstrap compiler -->
<if>
<or> <or>
<not> <not>
<isset property="teamcity.version"/> <isset property="teamcity.version"/>
@@ -261,46 +240,38 @@
<istrue value="${bootstrap.build.no.tests}"/> <istrue value="${bootstrap.build.no.tests}"/>
</and> </and>
</or> </or>
<then> </condition>
<!-- Download bootstrap compiler for local build -->
<download_teamcity_artifact
teamcity.server.url="https://teamcity.jetbrains.com"
build.locator.request="${kotlin.bootstrap.locator}"
artifact.path="kotlin-plugin-{build.number}.zip"
dest="dependencies/download/bootstrap-compiler.zip"
usetimestamp="true"/>
<delete dir="dependencies/bootstrap-compiler" failonerror="false"/> <sequential if:set="download.bootstrap.compiler">
<unzip src="dependencies/download/bootstrap-compiler.zip" dest="dependencies/bootstrap-compiler"/> <!-- Download bootstrap compiler for local build -->
</then> <download_teamcity_artifact
<else> teamcity.server.url="https://teamcity.jetbrains.com"
<!-- Teamcity should provide bootstrap compiler with dependency feature --> build.locator.request="${kotlin.bootstrap.locator}"
<if> artifact.path="kotlin-plugin-{build.number}.zip"
<not> dest="dependencies/download/bootstrap-compiler.zip"
<and> usetimestamp="true"/>
<available file="dependencies/bootstrap-compiler/Kotlin"/>
</and>
</not>
<then>
<fail message="Bootstrap compiler is expected to be downloaded to 'dependencies/bootstrap-compiler' by TeamCity"/>
</then>
<else>
<echo message="Bootstrap compiler found in 'dependencies/bootstrap-compiler'"/>
</else>
</if>
</else>
</if>
<if> <delete dir="dependencies/bootstrap-compiler" failonerror="false"/>
<unzip src="dependencies/download/bootstrap-compiler.zip" dest="dependencies/bootstrap-compiler"/>
</sequential>
<sequential unless:set="download.bootstrap.compiler">
<available file="dependencies/bootstrap-compiler/Kotlin" property="have.bootstrap.compiler"/>
<fail message="Bootstrap compiler is expected to be downloaded to 'dependencies/bootstrap-compiler' by TeamCity" unless:set="have.bootstrap.compiler"/>
<echo message="Bootstrap compiler found in 'dependencies/bootstrap-compiler'" if:set="have.bootstrap.compiler"/>
</sequential>
<local name="bootstrap.need.chmod"/>
<condition property="bootstrap.need.chmod">
<matches pattern="mac\.zip|tar\.gz" string="${os.tag}"/> <matches pattern="mac\.zip|tar\.gz" string="${os.tag}"/>
<then> </condition>
<!-- Java can't manipulate permissions -->
<exec executable="find"> <!-- Java can't manipulate permissions -->
<arg value="dependencies/bootstrap-compiler/Kotlin/kotlinc/bin"/> <exec executable="find" if:set="bootstrap.need.chmod">
<arg line="-name 'kotlin*' ! -name '*.bat' -exec chmod a+x '{}' ;"/> <arg value="dependencies/bootstrap-compiler/Kotlin/kotlinc/bin"/>
</exec> <arg line="-name 'kotlin*' ! -name '*.bat' -exec chmod a+x '{}' ;"/>
</then> </exec>
</if>
<download-or-build-markdown-parser/> <download-or-build-markdown-parser/>
</target> </target>
@@ -310,8 +281,6 @@
<attribute name="version.number"/> <attribute name="version.number"/>
<attribute name="version.buildtools"/> <attribute name="version.buildtools"/>
<sequential> <sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<condition property="android.os.tag" value="windows"> <condition property="android.os.tag" value="windows">
<os family="windows"/> <os family="windows"/>
</condition> </condition>
@@ -346,19 +315,19 @@
<cutdirsmapper dirs="1"/> <cutdirsmapper dirs="1"/>
</unzip> </unzip>
<if> <condition property="android.need.chmod">
<equals arg1="${android.os.tag}" arg2="windows"/> <not>
<then/> <equals arg1="${android.os.tag}" arg2="windows"/>
<else> </not>
<exec executable="chmod"> </condition>
<arg value="a+x"/>
<arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/aapt"/> <exec executable="chmod" if:set="android.need.chmod">
<arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/aidl"/> <arg value="a+x"/>
<arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/dx"/> <arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/aapt"/>
<arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/zipalign"/> <arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/aidl"/>
</exec> <arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/dx"/>
</else> <arg path="dependencies/androidSDK/build-tools/@{version.buildtools}/zipalign"/>
</if> </exec>
</sequential> </sequential>
</macrodef> </macrodef>
@@ -396,43 +365,45 @@
<arg value="${basedir}/dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"/> <arg value="${basedir}/dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"/>
</exec> </exec>
<if> <local name="markdown.need.recompile"/>
<condition property="markdown.need.recompile">
<not> <not>
<equals arg1="${markdown.abi.incompatible}" arg2="0"/> <equals arg1="${markdown.abi.incompatible}" arg2="0"/>
</not> </not>
<then> </condition>
<echo message="Recompiling intellij-markdown manually"/>
<length file="dependencies/markdown.jar" property="old.markdown.size"/>
<echo message="Size of the incompatible jar: ${old.markdown.size} bytes"/>
<get src="https://github.com/valich/intellij-markdown/archive/master.zip" <sequential if:set="markdown.need.recompile">
dest="dependencies/download/markdown-sources.zip" usetimestamp="true"/> <echo message="Recompiling intellij-markdown manually"/>
<length file="dependencies/markdown.jar" property="old.markdown.size"/>
<echo message="Size of the incompatible jar: ${old.markdown.size} bytes"/>
<delete dir="dependencies/intellij-markdown-master" failonerror="false"/> <get src="https://github.com/valich/intellij-markdown/archive/master.zip"
<unzip src="dependencies/download/markdown-sources.zip" dest="dependencies"/> dest="dependencies/download/markdown-sources.zip" usetimestamp="true"/>
<exec executable="dependencies/bootstrap-compiler/Kotlin/kotlinc/bin/${kotlinc.executable.path}" failonerror="true">
<arg value="dependencies/intellij-markdown-master/src"/>
<arg value="-d"/>
<arg value="dependencies/intellij-markdown-master/out"/>
</exec>
<javac srcdir="dependencies/intellij-markdown-master/src" <delete dir="dependencies/intellij-markdown-master" failonerror="false"/>
destdir="dependencies/intellij-markdown-master/out" includeantruntime="false"> <unzip src="dependencies/download/markdown-sources.zip" dest="dependencies"/>
<classpath> <exec executable="dependencies/bootstrap-compiler/Kotlin/kotlinc/bin/${kotlinc.executable.path}" failonerror="true">
<path location="dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"/> <arg value="dependencies/intellij-markdown-master/src"/>
</classpath> <arg value="-d"/>
</javac> <arg value="dependencies/intellij-markdown-master/out"/>
</exec>
<delete file="dependencies/markdown.jar" failonerror="false"/> <javac srcdir="dependencies/intellij-markdown-master/src"
<jar jarfile="dependencies/markdown.jar"> destdir="dependencies/intellij-markdown-master/out" includeantruntime="false">
<fileset dir="dependencies/intellij-markdown-master/out" includes="**"/> <classpath>
</jar> <path location="dependencies/bootstrap-compiler/Kotlin/kotlinc/lib/kotlin-runtime.jar"/>
</classpath>
</javac>
<echo message="Compilation of intellij-markdown finished"/> <delete file="dependencies/markdown.jar" failonerror="false"/>
<length file="dependencies/markdown.jar" property="new.markdown.size"/> <jar jarfile="dependencies/markdown.jar">
<echo message="Size of the new jar: ${new.markdown.size} bytes"/> <fileset dir="dependencies/intellij-markdown-master/out" includes="**"/>
</then> </jar>
</if>
<echo message="Compilation of intellij-markdown finished"/>
<length file="dependencies/markdown.jar" property="new.markdown.size"/>
<echo message="Size of the new jar: ${new.markdown.size} bytes"/>
</sequential>
</sequential> </sequential>
</macrodef> </macrodef>
@@ -472,20 +443,21 @@
<url url="@{base.url}/BUILD/@{idea.maven.version}/BUILD-@{idea.maven.version}.txt"/> <url url="@{base.url}/BUILD/@{idea.maven.version}/BUILD-@{idea.maven.version}.txt"/>
</loadresource> </loadresource>
<if> <local name="idea.already.downloaded"/>
<condition property="idea.already.downloaded">
<equals arg1="${dependencies.info.prev.idea.build.id}" arg2="${execute.build.id}"/> <equals arg1="${dependencies.info.prev.idea.build.id}" arg2="${execute.build.id}"/>
<then> </condition>
<echo message="IDEA build id: ${execute.build.id}. Already downloaded."/>
</then>
<else>
<echo message="IDEA build id: ${execute.build.id}, previous build id: ${dependencies.info.prev.idea.build.id}"/>
<download_and_update_idea idea.maven.version="@{idea.maven.version}" base.repository.url="@{base.url}"/>
<propertyfile file="${dependencies.info.file}"> <echo message="IDEA build id: ${execute.build.id}. Already downloaded." if:set="idea.already.downloaded"/>
<entry key="idea.build.id" value="${execute.build.id}"/>
</propertyfile> <sequential unless:set="idea.already.downloaded">
</else> <echo message="IDEA build id: ${execute.build.id}, previous build id: ${dependencies.info.prev.idea.build.id}"/>
</if> <download_and_update_idea idea.maven.version="@{idea.maven.version}" base.repository.url="@{base.url}"/>
<propertyfile file="${dependencies.info.file}">
<entry key="idea.build.id" value="${execute.build.id}"/>
</propertyfile>
</sequential>
</sequential> </sequential>
</macrodef> </macrodef>
@@ -505,20 +477,21 @@
</filterchain> </filterchain>
</loadresource> </loadresource>
<if> <local name="idea.already.downloaded"/>
<condition property="idea.already.downloaded">
<equals arg1="${dependencies.info.prev.idea.build.id}" arg2="${execute.build.id}"/> <equals arg1="${dependencies.info.prev.idea.build.id}" arg2="${execute.build.id}"/>
<then> </condition>
<echo message="IDEA build id: ${execute.build.id}. Already downloaded."/>
</then>
<else>
<echo message="IDEA build id: ${execute.build.id}, previous build id: ${dependencies.info.prev.idea.build.id}"/>
<execute_update base.url="@{teamcity.server.url}/guestAuth/app/rest/builds/id:${execute.build.id}"/>
<propertyfile file="${dependencies.info.file}"> <echo message="IDEA build id: ${execute.build.id}. Already downloaded." if:set="idea.already.downloaded"/>
<entry key="idea.build.id" value="${execute.build.id}"/>
</propertyfile> <sequential unless:set="idea.already.downloaded">
</else> <echo message="IDEA build id: ${execute.build.id}, previous build id: ${dependencies.info.prev.idea.build.id}"/>
</if> <execute_update base.url="@{teamcity.server.url}/guestAuth/app/rest/builds/id:${execute.build.id}"/>
<propertyfile file="${dependencies.info.file}">
<entry key="idea.build.id" value="${execute.build.id}"/>
</propertyfile>
</sequential>
</sequential> </sequential>
</macrodef> </macrodef>
@@ -562,12 +535,12 @@
</filterchain> </filterchain>
</loadresource> </loadresource>
<propertyregex property="processed.artifact.path" <loadresource property="processed.artifact.path">
input="@{artifact.path}" <string value="@{artifact.path}"/>
regexp="\{build.number\}" <filterchain>
replace="${artifact.build.number}" <replacestring from="{build.number}" to="${artifact.build.number}"/>
global="true" </filterchain>
defaultvalue="@{artifact.path}"/> </loadresource>
<echo message="Build Number: ${artifact.build.number} Build Id: ${artifact.build.id}"/> <echo message="Build Number: ${artifact.build.number} Build Id: ${artifact.build.id}"/>
@@ -597,126 +570,142 @@
<attribute name="sources" default="@{idea.dir}/sources"/> <attribute name="sources" default="@{idea.dir}/sources"/>
<sequential> <sequential>
<if> <sequential if:true="@{idea.sdk.fetch.needed}">
<istrue value="@{idea.sdk.fetch.needed}"/> <delete dir="@{idea.dir}" failonerror="false">
<then> <exclude name="config-idea/**"/>
<delete dir="@{idea.dir}" failonerror="false"> <exclude name="system-idea/**"/>
<exclude name="config-idea/**"/> </delete>
<exclude name="system-idea/**"/>
</delete>
<if> <local name="unpack.idea.sdk.windows"/>
<condition property="unpack.idea.sdk.windows">
<or>
<matches pattern=".+\.win\.zip" string="${idea.archive.name}"/>
<istrue value="@{download.file.archive.idea.win.only}"/>
</or>
</condition>
<local name="unpack.idea.sdk.mac"/>
<condition property="unpack.idea.sdk.mac">
<and>
<not>
<isset property="unpack.idea.sdk.windows"/>
</not>
<matches pattern=".+\.mac\.zip" string="${idea.archive.name}"/>
</and>
</condition>
<local name="unpack.idea.sdk.unix"/>
<condition property="unpack.idea.sdk.unix">
<not>
<or> <or>
<matches pattern=".+\.win\.zip" string="${idea.archive.name}"/> <isset property="unpack.idea.sdk.windows"/>
<istrue value="@{download.file.archive.idea.win.only}"/> <isset property="unpack.idea.sdk.mac"/>
</or> </or>
<then> </not>
<unzip src="@{download.file.archive.idea}" dest="@{idea.dir}"/> </condition>
</then>
<elseif>
<matches pattern=".+\.mac\.zip" string="${idea.archive.name}"/>
<then>
<unzip src="@{download.file.archive.idea}" dest="@{idea.dir}">
<cutdirsmapper dirs="2"/>
</unzip>
<!-- Java can't manipulate permissions -->
<exec executable="chmod">
<arg value="a+x"/>
<arg path="@{idea.dir}/bin/fsnotifier"/>
<arg path="@{idea.dir}/bin/inspect.sh"/>
<arg path="@{idea.dir}/bin/printenv.py"/>
<arg path="@{idea.dir}/bin/restarter"/>
</exec>
</then>
</elseif>
<else>
<untar src="@{download.file.archive.idea}" dest="@{idea.dir}" compression="gzip">
<cutdirsmapper dirs="1"/>
</untar>
<!-- Java can't manipulate permissions -->
<exec executable="chmod">
<arg value="a+x"/>
<arg path="@{idea.dir}/bin/fsnotifier"/>
<arg path="@{idea.dir}/bin/fsnotifier64"/>
<arg path="@{idea.dir}/bin/inspect.sh"/>
<arg path="@{idea.dir}/bin/idea.sh"/>
</exec>
</else>
</if>
<!-- <unzip src="@{download.file.archive.idea}" dest="@{idea.dir}" if:set="unpack.idea.sdk.windows"/>
This one needs to be deleted because otherwise it gets onto the classpath
together with junit-4.10.jar and the classloading goes crazy that breaks
many nice features of IDEA including diffs in the test console.
-->
<delete file="@{idea.dir}/lib/junit.jar"/>
<!-- <sequential if:set="unpack.idea.sdk.mac">
Plugin depends on newer runtime and reflect jar from our bootstrap compiler. <unzip src="@{download.file.archive.idea}" dest="@{idea.dir}">
Avoid depending on old runtime during build phase but attach original runtime when idea starts. <cutdirsmapper dirs="2"/>
--> </unzip>
<mkdir dir="@{idea.dir}/idea-kotlin-runtime"/> <!-- Java can't manipulate permissions -->
<move file="@{idea.dir}/lib/kotlin-runtime.jar" todir="@{idea.dir}/idea-kotlin-runtime"/> <exec executable="chmod">
<move file="@{idea.dir}/lib/kotlin-reflect.jar" todir="@{idea.dir}/idea-kotlin-runtime"/> <arg value="a+x"/>
<arg path="@{idea.dir}/bin/fsnotifier"/>
<arg path="@{idea.dir}/bin/inspect.sh"/>
<arg path="@{idea.dir}/bin/printenv.py"/>
<arg path="@{idea.dir}/bin/restarter"/>
</exec>
</sequential>
<delete dir="@{idea.dir}/plugins/Kotlin"/> <sequential if:set="unpack.idea.sdk.unix">
<untar src="@{download.file.archive.idea}" dest="@{idea.dir}" compression="gzip">
<cutdirsmapper dirs="1"/>
</untar>
<!-- Java can't manipulate permissions -->
<exec executable="chmod">
<arg value="a+x"/>
<arg path="@{idea.dir}/bin/fsnotifier"/>
<arg path="@{idea.dir}/bin/fsnotifier64"/>
<arg path="@{idea.dir}/bin/inspect.sh"/>
<arg path="@{idea.dir}/bin/idea.sh"/>
</exec>
</sequential>
<echo message="@{download.dir.intellij-core}/intellij-core-analysis.jar"/> <!--
This one needs to be deleted because otherwise it gets onto the classpath
together with junit-4.10.jar and the classloading goes crazy that breaks
many nice features of IDEA including diffs in the test console.
-->
<delete file="@{idea.dir}/lib/junit.jar"/>
<mkdir dir="@{core-analysis}"/> <!--
<copy file="@{download.dir.intellij-core}/intellij-core-analysis.jar" Plugin depends on newer runtime and reflect jar from our bootstrap compiler.
tofile="@{core-analysis}/intellij-core-analysis.jar" Avoid depending on old runtime during build phase but attach original runtime when idea starts.
verbose="true"/> -->
<mkdir dir="@{idea.dir}/idea-kotlin-runtime"/>
<move file="@{idea.dir}/lib/kotlin-runtime.jar" todir="@{idea.dir}/idea-kotlin-runtime"/>
<move file="@{idea.dir}/lib/kotlin-reflect.jar" todir="@{idea.dir}/idea-kotlin-runtime"/>
<mkdir dir="@{core}"/> <delete dir="@{idea.dir}/plugins/Kotlin"/>
<copy todir="@{core}" flatten="true" verbose="true">
<resources>
<file file="@{download.dir.intellij-core}/intellij-core.jar"/>
<file file="@{download.dir.intellij-core}/annotations.jar"/>
<file file="@{download.dir.intellij-core}/guava-17.0.jar"/>
<file file="@{download.dir.intellij-core}/picocontainer.jar"/>
<file file="@{download.dir.intellij-core}/trove4j.jar"/>
<file file="@{idea.dir}/lib/jdom.jar"/> <echo message="@{download.dir.intellij-core}/intellij-core-analysis.jar"/>
<file file="@{idea.dir}/lib/jna.jar"/>
<file file="@{idea.dir}/lib/log4j.jar"/>
<file file="@{idea.dir}/lib/xstream-1.4.3.jar"/>
<file file="@{idea.dir}/lib/xpp3-1.1.4-min.jar"/>
<file file="@{idea.dir}/lib/jsr166e.jar"/>
<file file="@{idea.dir}/lib/asm-all.jar"/>
<file file="@{idea.dir}/lib/snappy-in-java-0.3.1.jar"/>
<!-- TODO temporary workaround since util-rt is not packaged into intellij-core.jar --> <mkdir dir="@{core-analysis}"/>
<file file="@{idea.dir}/lib/util.jar"/> <copy file="@{download.dir.intellij-core}/intellij-core-analysis.jar"
</resources> tofile="@{core-analysis}/intellij-core-analysis.jar"
</copy> verbose="true"/>
<mkdir dir="@{jps}"/> <mkdir dir="@{core}"/>
<copy todir="@{jps}" flatten="true" verbose="true"> <copy todir="@{core}" flatten="true" verbose="true">
<resources> <resources>
<file file="@{download.dir.jps-standalone}/groovy-jps-plugin.jar"/> <file file="@{download.dir.intellij-core}/intellij-core.jar"/>
<file file="@{download.dir.jps-standalone}/groovy_rt.jar"/> <file file="@{download.dir.intellij-core}/annotations.jar"/>
<file file="@{download.dir.jps-standalone}/jdom.jar"/> <file file="@{download.dir.intellij-core}/guava-17.0.jar"/>
<file file="@{download.dir.jps-standalone}/jgoodies-forms.jar"/> <file file="@{download.dir.intellij-core}/picocontainer.jar"/>
<file file="@{download.dir.jps-standalone}/jna.jar"/> <file file="@{download.dir.intellij-core}/trove4j.jar"/>
<file file="@{download.dir.jps-standalone}/jps-builders.jar"/>
<file file="@{download.dir.jps-standalone}/jps-model.jar"/>
<file file="@{download.dir.jps-standalone}/log4j.jar"/>
<file file="@{download.dir.jps-standalone}/nanoxml-2.2.3.jar"/>
<file file="@{download.dir.jps-standalone}/protobuf-2.5.0.jar"/>
<file file="@{download.dir.jps-standalone}/trove4j.jar"/>
<file file="@{download.dir.jps-standalone}/ui-designer-jps-plugin.jar"/>
<file file="@{download.dir.jps-standalone}/util.jar"/>
</resources>
</copy>
<mkdir dir="@{jps-test}"/> <file file="@{idea.dir}/lib/jdom.jar"/>
<copy file="@{download.file.archive.jps-build-test}" tofile="@{jps-test}/jps-build-test.jar"/> <file file="@{idea.dir}/lib/jna.jar"/>
<file file="@{idea.dir}/lib/log4j.jar"/>
<file file="@{idea.dir}/lib/xstream-1.4.3.jar"/>
<file file="@{idea.dir}/lib/xpp3-1.1.4-min.jar"/>
<file file="@{idea.dir}/lib/jsr166e.jar"/>
<file file="@{idea.dir}/lib/asm-all.jar"/>
<file file="@{idea.dir}/lib/snappy-in-java-0.3.1.jar"/>
<mkdir dir="@{sources}"/> <!-- TODO temporary workaround since util-rt is not packaged into intellij-core.jar -->
<copy file="@{download.file.archive.sources}" tofile="@{sources}/sources.jar" overwrite="true"/> <file file="@{idea.dir}/lib/util.jar"/>
</then> </resources>
</if> </copy>
<mkdir dir="@{jps}"/>
<copy todir="@{jps}" flatten="true" verbose="true">
<resources>
<file file="@{download.dir.jps-standalone}/groovy-jps-plugin.jar"/>
<file file="@{download.dir.jps-standalone}/groovy_rt.jar"/>
<file file="@{download.dir.jps-standalone}/jdom.jar"/>
<file file="@{download.dir.jps-standalone}/jgoodies-forms.jar"/>
<file file="@{download.dir.jps-standalone}/jna.jar"/>
<file file="@{download.dir.jps-standalone}/jps-builders.jar"/>
<file file="@{download.dir.jps-standalone}/jps-model.jar"/>
<file file="@{download.dir.jps-standalone}/log4j.jar"/>
<file file="@{download.dir.jps-standalone}/nanoxml-2.2.3.jar"/>
<file file="@{download.dir.jps-standalone}/protobuf-2.5.0.jar"/>
<file file="@{download.dir.jps-standalone}/trove4j.jar"/>
<file file="@{download.dir.jps-standalone}/ui-designer-jps-plugin.jar"/>
<file file="@{download.dir.jps-standalone}/util.jar"/>
</resources>
</copy>
<mkdir dir="@{jps-test}"/>
<copy file="@{download.file.archive.jps-build-test}" tofile="@{jps-test}/jps-build-test.jar"/>
<mkdir dir="@{sources}"/>
<copy file="@{download.file.archive.sources}" tofile="@{sources}/sources.jar" overwrite="true"/>
</sequential>
<build-protobuf-java-lite/> <build-protobuf-java-lite/>
</sequential> </sequential>
@@ -772,18 +761,15 @@
<sequential> <sequential>
<get src="@{url}" dest="@{dir}.zip" usetimestamp="@{usetimestamp}"/> <get src="@{url}" dest="@{dir}.zip" usetimestamp="@{usetimestamp}"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/> <local name="need.unpack"/>
<if> <condition property="need.unpack">
<not> <not>
<available file="@{dir}" type="dir"/> <available file="@{dir}" type="dir"/>
</not> </not>
<then> </condition>
<unzip src="@{dir}.zip" dest="@{dir}"/>
</then> <unzip src="@{dir}.zip" dest="@{dir}" if:set="need.unpack"/>
<else> <echo message="Folder exist - so not unpacked @{dir}" unless:set="need.unpack"/>
<echo message="Folder exist - so not unpacked @{dir}"/>
</else>
</if>
</sequential> </sequential>
</macrodef> </macrodef>
@@ -792,8 +778,6 @@
<attribute name="base.url"/> <attribute name="base.url"/>
<sequential> <sequential>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<loadresource property="idea.build.number"> <loadresource property="idea.build.number">
<url url="@{base.url}/artifacts/children"/> <url url="@{base.url}/artifacts/children"/>
<filterchain> <filterchain>
@@ -815,39 +799,35 @@
<property name="jps.extracted.dir" value="${idea.download.dir}/standalone-jps"/> <property name="jps.extracted.dir" value="${idea.download.dir}/standalone-jps"/>
<property name="core.dir" value="${idea.download.dir}/core"/> <property name="core.dir" value="${idea.download.dir}/core"/>
<if> <sequential if:true="${idea.sdk.fetch.needed}">
<istrue value="${idea.sdk.fetch.needed}"/> <delete dir="${idea.download.dir}"/>
<mkdir dir="${idea.download.dir}"/>
<then> <get src="${content.base.url}/jps/standalone-jps-IC-${idea.build.number}.zip"
<delete dir="${idea.download.dir}"/> dest="${idea.download.dir}/standalone-jps.zip"/>
<mkdir dir="${idea.download.dir}"/> <unzip src="${idea.download.dir}/standalone-jps.zip"
dest="${jps.extracted.dir}"/>
<get src="${content.base.url}/jps/standalone-jps-IC-${idea.build.number}.zip" <delete file="${idea.download.dir}/${idea.archive.name}" failonerror="false"/>
dest="${idea.download.dir}/standalone-jps.zip"/> <get src="${content.base.url}/${idea.archive.name}"
<unzip src="${idea.download.dir}/standalone-jps.zip" dest="${idea.download.dir}/${idea.archive.name}"/>
dest="${jps.extracted.dir}"/>
<delete file="${idea.download.dir}/${idea.archive.name}" failonerror="false"/> <get src="${content.base.url}/jps/jps-build-test-IC-${idea.build.number}.jar"
<get src="${content.base.url}/${idea.archive.name}" dest="${idea.download.dir}/jps-build-test.jar"
dest="${idea.download.dir}/${idea.archive.name}"/> usetimestamp="true"/>
<get src="${content.base.url}/jps/jps-build-test-IC-${idea.build.number}.jar" <mkdir dir="${core.dir}"/>
dest="${idea.download.dir}/jps-build-test.jar" <get src="${content.base.url}/core/intellij-core.jar" dest="${core.dir}/intellij-core.jar"/>
usetimestamp="true"/> <get src="${content.base.url}/core/annotations.jar" dest="${core.dir}/annotations.jar"/>
<get src="${content.base.url}/core/guava-17.0.jar" dest="${core.dir}/guava-17.0.jar"/>
<get src="${content.base.url}/core/picocontainer.jar" dest="${core.dir}/picocontainer.jar"/>
<get src="${content.base.url}/core/trove4j.jar" dest="${core.dir}/trove4j.jar"/>
<mkdir dir="${core.dir}"/> <get src="${content.base.url}/core/intellij-core-analysis.jar" dest="${core.dir}/intellij-core-analysis.jar"/>
<get src="${content.base.url}/core/intellij-core.jar" dest="${core.dir}/intellij-core.jar"/>
<get src="${content.base.url}/core/annotations.jar" dest="${core.dir}/annotations.jar"/>
<get src="${content.base.url}/core/guava-17.0.jar" dest="${core.dir}/guava-17.0.jar"/>
<get src="${content.base.url}/core/picocontainer.jar" dest="${core.dir}/picocontainer.jar"/>
<get src="${content.base.url}/core/trove4j.jar" dest="${core.dir}/trove4j.jar"/>
<get src="${content.base.url}/core/intellij-core-analysis.jar" dest="${core.dir}/intellij-core-analysis.jar"/> <delete file="${idea.download.dir}/idea-sdk-sources.jar" failonerror="false"/>
<get src="${content.base.url}/sources.jar" dest="${idea.download.dir}/idea-sdk-sources.jar"/>
<delete file="${idea.download.dir}/idea-sdk-sources.jar" failonerror="false"/> </sequential>
<get src="${content.base.url}/sources.jar" dest="${idea.download.dir}/idea-sdk-sources.jar"/>
</then>
</if>
<configure_idea_sdk_dir <configure_idea_sdk_dir
idea.dir="${idea.dir}" idea.dir="${idea.dir}"
@@ -871,8 +851,6 @@
<target name="fetch-annotations"/> <target name="fetch-annotations"/>
<target name="get_android_studio"> <target name="get_android_studio">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<condition property="android.os.tag" value="windows"> <condition property="android.os.tag" value="windows">
<os family="windows"/> <os family="windows"/>
</condition> </condition>
@@ -890,38 +868,38 @@
</and> </and>
</condition> </condition>
<if> <local name="have.android.version"/>
<not> <condition property="have.android.version">
<and> <and>
<isset property="android.version"/> <isset property="android.version"/>
<isset property="android.build.version"/> <isset property="android.build.version"/>
</and> </and>
</not> </condition>
<then>
<loadresource property="android.version"> <sequential unless:set="have.android.version">
<url url="http://tools.android.com/download/studio/canary/latest"/> <loadresource property="android.version">
<filterchain> <url url="http://tools.android.com/download/studio/canary/latest"/>
<tokenfilter> <filterchain>
<filetokenizer/> <tokenfilter>
<replaceregex <filetokenizer/>
pattern="^(.*)https?://dl\.google\.com/dl/android/studio/ide-zips/([\d\.]+)/android-studio-ide(.*)$" <replaceregex
replace="\2" flags="s"/> pattern="^(.*)https?://dl\.google\.com/dl/android/studio/ide-zips/([\d\.]+)/android-studio-ide(.*)$"
</tokenfilter> replace="\2" flags="s"/>
</filterchain> </tokenfilter>
</loadresource> </filterchain>
<loadresource property="android.build.version"> </loadresource>
<url url="http://tools.android.com/download/studio/canary/latest"/> <loadresource property="android.build.version">
<filterchain> <url url="http://tools.android.com/download/studio/canary/latest"/>
<tokenfilter> <filterchain>
<filetokenizer/> <tokenfilter>
<replaceregex <filetokenizer/>
pattern="^(.*)https?://dl\.google\.com/dl/android/studio/ide-zips/[\d\.]+/android-studio-ide-([\d\.]+)-(.*)$" <replaceregex
replace="\2" flags="s"/> pattern="^(.*)https?://dl\.google\.com/dl/android/studio/ide-zips/[\d\.]+/android-studio-ide-([\d\.]+)-(.*)$"
</tokenfilter> replace="\2" flags="s"/>
</filterchain> </tokenfilter>
</loadresource> </filterchain>
</then> </loadresource>
</if> </sequential>
<echo message="Download android studio: ${android.version} ${android.build.version}"/> <echo message="Download android studio: ${android.version} ${android.build.version}"/>
@@ -943,38 +921,31 @@
<cutdirsmapper dirs="1"/> <cutdirsmapper dirs="1"/>
</unzip> </unzip>
<if> <local name="android.studio.mac"/>
<matches pattern=".+windows\.zip" string="${android.file.name}"/> <condition property="android.studio.mac">
<then> <matches pattern=".+mac\.zip" string="${android.file.name}"/>
</then> </condition>
<elseif>
<matches pattern=".+mac\.zip" string="${android.file.name}"/> <local name="android.studio.linux"/>
<then> <condition property="android.studio.linux">
<exec executable="chmod"> <matches pattern=".+linux\.zip" string="${android.file.name}"/>
<arg value="a+x"/> </condition>
<arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/> <exec executable="chmod" if:set="android.studio.mac">
<arg path="${android.destination.dir}/bin/printenv.py"/> <arg value="a+x"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/> <arg path="${android.destination.dir}/bin/fsnotifier"/>
</exec> <arg path="${android.destination.dir}/bin/inspect.sh"/>
</then> <arg path="${android.destination.dir}/bin/printenv.py"/>
</elseif> <arg path="${android.destination.dir}/bin/update_studio.sh"/>
<elseif> </exec>
<matches pattern=".+linux\.zip" string="${android.file.name}"/>
<then> <exec executable="chmod" if:set="android.studio.linux">
<exec executable="chmod"> <arg value="a+x"/>
<arg value="a+x"/> <arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/fsnotifier"/> <arg path="${android.destination.dir}/bin/fsnotifier64"/>
<arg path="${android.destination.dir}/bin/fsnotifier64"/> <arg path="${android.destination.dir}/bin/inspect.sh"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/> <arg path="${android.destination.dir}/bin/studio.sh"/>
<arg path="${android.destination.dir}/bin/studio.sh"/> <arg path="${android.destination.dir}/bin/update_studio.sh"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/> </exec>
</exec>
</then>
</elseif>
<else>
<fail message="File name '${android.file.name}' wasn't matched"/>
</else>
</if>
</target> </target>
</project> </project>