Set indentation to 4 for XML, in particular Ant build files

This commit is contained in:
Alexander Udalov
2014-08-15 12:16:20 +04:00
parent cc4a67da71
commit 9a98025f81
3 changed files with 333 additions and 330 deletions
+1 -2
View File
@@ -5,7 +5,7 @@
<value>
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="INDENT_SIZE" value="4" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
<option name="USE_TAB_CHARACTER" value="false" />
@@ -265,7 +265,6 @@
</codeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="8" />
</indentOptions>
+172 -168
View File
@@ -1,6 +1,5 @@
<project name="Kotlin" default="dist">
<property file="resources/manifest.properties" />
<property file="resources/manifest.properties"/>
<!-- Set to false to disable proguard run on kotlin-compiler.jar. Speeds up the build -->
<property name="shrink" value="true"/>
@@ -25,7 +24,7 @@
<property name="external.annotations.path" value="${basedir}/annotations"/>
<property name="dependencies.dir" value="${basedir}/dependencies" />
<property name="dependencies.dir" value="${basedir}/dependencies"/>
<path id="classpath">
<file file="${bootstrap.runtime}"/>
@@ -44,18 +43,18 @@
<taskdef name="javac2" classname="org.apache.tools.ant.taskdefs.Javac"/>
<if>
<istrue value="${generate.assertions}"/>
<then>
<path id="javac2.classpath">
<pathelement location="${idea.sdk}/lib/javac2.jar"/>
<pathelement location="${idea.sdk}/lib/asm-all.jar"/>
</path>
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<echo message="Use javac2 from Idea lib"/>
</then>
<else>
<echo message="Use default javac compiler"/>
</else>
<istrue value="${generate.assertions}"/>
<then>
<path id="javac2.classpath">
<pathelement location="${idea.sdk}/lib/javac2.jar"/>
<pathelement location="${idea.sdk}/lib/asm-all.jar"/>
</path>
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<echo message="Use javac2 from Idea lib"/>
</then>
<else>
<echo message="Use default javac compiler"/>
</else>
</if>
<dirset id="compilerSources.dirset" dir="${basedir}/">
@@ -175,7 +174,7 @@
</manifest>
</jar>
<if>
<if>
<istrue value="${generate.javadoc}"/>
<then>
@@ -238,7 +237,7 @@
<taskdef name="closure-compiler"
classname="com.google.javascript.jscomp.ant.CompileTask"
classpath="${dependencies.dir}/closure-compiler.jar" />
classpath="${dependencies.dir}/closure-compiler.jar"/>
<closure-compiler
compilationLevel="simple"
@@ -246,51 +245,52 @@
languagein="ECMASCRIPT5_STRICT"
warning="verbose"
debug="false"
output="${kotlin-home}/lib/kotlin.js" >
output="${kotlin-home}/lib/kotlin.js">
<sources dir="${basedir}/js/js.translator/testData">
<file name="kotlin_lib_ecma5.js"/>
<file name="kotlin_lib.js"/>
<file name="maps.js"/>
</sources>
<sources dir="${basedir}/js/js.translator/testData">
<file name="kotlin_lib_ecma5.js"/>
<file name="kotlin_lib.js"/>
<file name="maps.js"/>
</sources>
</closure-compiler>
</target>
<target name="preloader">
<cleandir dir="${output}/classes/preloader"/>
<javac2 destdir="${output}/classes/preloader" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false" source="${java.target}" target="${java.target}">
<src refid="preloaderSources.path"/>
</javac2>
<cleandir dir="${output}/classes/preloader"/>
<javac2 destdir="${output}/classes/preloader" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<src refid="preloaderSources.path"/>
</javac2>
<jar jarfile="${kotlin-home}/lib/kotlin-preloader.jar">
<fileset dir="${output}/classes/preloader"/>
<jar jarfile="${kotlin-home}/lib/kotlin-preloader.jar">
<fileset dir="${output}/classes/preloader"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.preloader}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.preloader}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
<attribute name="Main-Class" value="org.jetbrains.jet.preloading.Preloader"/>
</manifest>
</jar>
<attribute name="Main-Class" value="org.jetbrains.jet.preloading.Preloader"/>
</manifest>
</jar>
</target>
<target name="builtins">
<cleandir dir="${output}/builtins"/>
<java classname="org.jetbrains.jet.utils.builtinsSerializer.BuiltinsSerializerPackage"
classpath="${bootstrap.compiler.home}/lib/kotlin-compiler.jar"
failonerror="true"
fork="true">
<assertions>
<enable/>
</assertions>
<arg value="${output}/builtins"/>
<arg value="core/builtins/native"/>
<arg value="core/builtins/src"/>
</java>
<cleandir dir="${output}/builtins"/>
<java classname="org.jetbrains.jet.utils.builtinsSerializer.BuiltinsSerializerPackage"
classpath="${bootstrap.compiler.home}/lib/kotlin-compiler.jar"
failonerror="true"
fork="true">
<assertions>
<enable/>
</assertions>
<arg value="${output}/builtins"/>
<arg value="core/builtins/native"/>
<arg value="core/builtins/src"/>
</java>
</target>
<macrodef name="pack_compiler">
@@ -298,58 +298,58 @@
<attribute name="compress" default="true"/>
<sequential>
<!--
For "Compiler and Plugin - Bootstrap - No Tests" configuration the compiler will contain the runtime it was built against, and
will NOT contain the new runtime in its "Class-Path" attribute. This is done because the new compiler is guaranteed to work
against the OLD runtime (because the new compiler is just a Kotlin application, compiled by the old compiler with the old
runtime), but _will not necessarily_ work against the new one.
However we don't do this on the second run of our distribution, i.e. we do not include the new runtime in the NEWEST compiler.
This is because there are little to no differences between the new and the newest runtime, and so we assume that our newest
compiler will work with any of them. Also distributing two runtimes (inside the compiler and a separate one) could cause all
kinds of problems and confusion for users who include both our compiler and runtime in their classpath
-->
<if>
<istrue value="${bootstrap.build.no.tests}"/>
<then>
<property name="compiler.manifest.class.path" value="."/>
</then>
<else>
<property name="compiler.manifest.class.path" value="kotlin-runtime.jar"/>
</else>
</if>
<!--
For "Compiler and Plugin - Bootstrap - No Tests" configuration the compiler will contain the runtime it was built against, and
will NOT contain the new runtime in its "Class-Path" attribute. This is done because the new compiler is guaranteed to work
against the OLD runtime (because the new compiler is just a Kotlin application, compiled by the old compiler with the old
runtime), but _will not necessarily_ work against the new one.
However we don't do this on the second run of our distribution, i.e. we do not include the new runtime in the NEWEST compiler.
This is because there are little to no differences between the new and the newest runtime, and so we assume that our newest
compiler will work with any of them. Also distributing two runtimes (inside the compiler and a separate one) could cause all
kinds of problems and confusion for users who include both our compiler and runtime in their classpath
-->
<if>
<istrue value="${bootstrap.build.no.tests}"/>
<then>
<property name="compiler.manifest.class.path" value="."/>
</then>
<else>
<property name="compiler.manifest.class.path" value="kotlin-runtime.jar"/>
</else>
</if>
<jar jarfile="@{jarfile}" compress="@{compress}" duplicate="preserve">
<zipfileset src="${bootstrap.runtime}">
<include name="**/*.class" if="${bootstrap.build.no.tests}"/>
</zipfileset>
<fileset dir="${output}/classes/compiler"/>
<fileset dir="${output}/builtins">
<include name="kotlin/**"/>
<exclude name="kotlin/internal/**"/>
</fileset>
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
<jar jarfile="@{jarfile}" compress="@{compress}" duplicate="preserve">
<zipfileset src="${bootstrap.runtime}">
<include name="**/*.class" if="${bootstrap.build.no.tests}"/>
</zipfileset>
<fileset dir="${output}/classes/compiler"/>
<fileset dir="${output}/builtins">
<include name="kotlin/**"/>
<exclude name="kotlin/internal/**"/>
</fileset>
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/core" includes="*.jar" excludes="util.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="jna-utils.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="oromatcher.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="protobuf-2.5.0.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/jps" includes="jps-model.jar"/>
<zipgroupfileset dir="${dependencies.dir}" includes="jline.jar"/>
<zipgroupfileset dir="${dependencies.dir}" includes="cli-parser-1.1.1.jar"/>
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/core" includes="*.jar" excludes="util.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="jna-utils.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="oromatcher.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/lib" includes="protobuf-2.5.0.jar"/>
<zipgroupfileset dir="${basedir}/ideaSDK/jps" includes="jps-model.jar"/>
<zipgroupfileset dir="${dependencies.dir}" includes="jline.jar"/>
<zipgroupfileset dir="${dependencies.dir}" includes="cli-parser-1.1.1.jar"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<manifest>
<attribute name="Built-By" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
<attribute name="Implementation-Vendor" value="${manifest.impl.vendor}"/>
<attribute name="Implementation-Title" value="${manifest.impl.title.kotlin.compiler}"/>
<attribute name="Implementation-Version" value="${build.number}"/>
<attribute name="Class-Path" value="${compiler.manifest.class.path}"/>
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
</manifest>
</jar>
<attribute name="Class-Path" value="${compiler.manifest.class.path}"/>
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
</manifest>
</jar>
</sequential>
</macrodef>
@@ -371,7 +371,8 @@
<cleandir dir="${output}/classes/compiler"/>
<javac2 destdir="${output}/classes/compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false" source="${java.target}" target="${java.target}">
<javac2 destdir="${output}/classes/compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin externalannotations="${external.annotations.path}"/>
<src refid="compilerSources.path"/>
<classpath refid="classpath"/>
@@ -518,7 +519,8 @@
<target name="antTools">
<cleandir dir="${output}/classes/buildTools"/>
<javac2 destdir="${output}/classes/buildTools" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false" source="${java.target}" target="${java.target}">
<javac2 destdir="${output}/classes/buildTools" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin externalannotations="${external.annotations.path}"/>
<src>
<dirset dir="${basedir}/build-tools">
@@ -552,45 +554,46 @@
</target>
<target name="jdkAnnotations">
<copy file="dependencies/annotations/kotlin-jdk-annotations.jar" todir="${kotlin-home}/lib"/>
<copy file="dependencies/annotations/kotlin-jdk-annotations.jar" todir="${kotlin-home}/lib"/>
</target>
<target name="androidSdkAnnotations">
<copy file="dependencies/annotations/kotlin-android-sdk-annotations.jar" todir="${kotlin-home}/lib"/>
<copy file="dependencies/annotations/kotlin-android-sdk-annotations.jar" todir="${kotlin-home}/lib"/>
</target>
<target name="runtime">
<macrodef name="new_kotlinc">
<attribute name="src"/>
<attribute name="output"/>
<attribute name="classpath"/>
<attribute name="src"/>
<attribute name="output"/>
<attribute name="classpath"/>
<sequential>
<cleandir dir="@{output}"/>
<sequential>
<cleandir dir="@{output}"/>
<java classname="org.jetbrains.jet.cli.jvm.K2JVMCompiler" failonerror="true" fork="true">
<classpath>
<path refid="classpath"/>
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
</classpath>
<assertions>
<enable/>
</assertions>
<arg line="@{src}"/>
<arg value="-d"/>
<arg value="@{output}"/>
<arg value="-no-stdlib"/>
<arg value="-classpath"/>
<arg value="@{classpath}"/>
</java>
</sequential>
<java classname="org.jetbrains.jet.cli.jvm.K2JVMCompiler" failonerror="true" fork="true">
<classpath>
<path refid="classpath"/>
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
</classpath>
<assertions>
<enable/>
</assertions>
<arg line="@{src}"/>
<arg value="-d"/>
<arg value="@{output}"/>
<arg value="-no-stdlib"/>
<arg value="-classpath"/>
<arg value="@{classpath}"/>
</java>
</sequential>
</macrodef>
<new_kotlinc src="${basedir}/core/builtins/src ${basedir}/core/runtime.jvm/src ${basedir}/core/reflection/src"
output="${output}/classes/runtime"
classpath="${basedir}/core/runtime.jvm/src"/>
<javac2 destdir="${output}/classes/runtime" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false" source="${java.target}" target="${java.target}">
<javac2 destdir="${output}/classes/runtime" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<src path="${basedir}/core/runtime.jvm/src"/>
<classpath location="${output}/classes/runtime"/>
</javac2>
@@ -656,57 +659,58 @@
</target>
<target name="kotlin-for-upsource" depends="dist">
<cleandir dir="${output}/classes/idea-analysis"/>
<cleandir dir="${output}/classes/idea-analysis"/>
<javac2 destdir="${output}/classes/idea-analysis" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false" source="${java.target}" target="${java.target}">
<withKotlin externalannotations="${external.annotations.path}"/>
<src >
<dirset dir="${basedir}/idea/idea-analysis">
<include name="src"/>
</dirset>
</src>
<classpath>
<fileset dir="${idea.sdk}" includes="core/*.jar"/>
<fileset dir="${idea.sdk}" includes="core-analysis/*.jar"/>
<fileset dir="${idea.sdk}" includes="lib/protobuf-2.5.0.jar"/>
<javac2 destdir="${output}/classes/idea-analysis" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false"
source="${java.target}" target="${java.target}">
<withKotlin externalannotations="${external.annotations.path}"/>
<src>
<dirset dir="${basedir}/idea/idea-analysis">
<include name="src"/>
</dirset>
</src>
<classpath>
<fileset dir="${idea.sdk}" includes="core/*.jar"/>
<fileset dir="${idea.sdk}" includes="core-analysis/*.jar"/>
<fileset dir="${idea.sdk}" includes="lib/protobuf-2.5.0.jar"/>
<fileset dir="${basedir}/lib" includes="**/*.jar"/>
<fileset dir="${dependencies.dir}" includes="jline.jar"/>
<fileset dir="${dependencies.dir}" includes="jansi.jar"/>
<fileset dir="${dependencies.dir}" includes="cli-parser-1.1.1.jar"/>
<fileset dir="${basedir}/ideaSDK/jps" includes="jps-model.jar"/>
<pathelement location="${output}/classes/runtime"/>
<pathelement location="${output}/classes/compiler"/>
<pathelement location="${output}/classes/stdlib"/>
</classpath>
</javac2>
<fileset dir="${basedir}/lib" includes="**/*.jar"/>
<fileset dir="${dependencies.dir}" includes="jline.jar"/>
<fileset dir="${dependencies.dir}" includes="jansi.jar"/>
<fileset dir="${dependencies.dir}" includes="cli-parser-1.1.1.jar"/>
<fileset dir="${basedir}/ideaSDK/jps" includes="jps-model.jar"/>
<pathelement location="${output}/classes/runtime"/>
<pathelement location="${output}/classes/compiler"/>
<pathelement location="${output}/classes/stdlib"/>
</classpath>
</javac2>
<jar jarfile="${output}/kotlin-for-upsource0.jar">
<fileset dir="${output}/classes/idea-analysis"/>
<fileset dir="${output}/classes/compiler"/>
<fileset dir="${output}/classes/runtime"/>
<fileset dir="${output}/builtins">
<include name="kotlin/**"/>
<exclude name="kotlin/internal/**"/>
</fileset>
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
<jar jarfile="${output}/kotlin-for-upsource0.jar">
<fileset dir="${output}/classes/idea-analysis"/>
<fileset dir="${output}/classes/compiler"/>
<fileset dir="${output}/classes/runtime"/>
<fileset dir="${output}/builtins">
<include name="kotlin/**"/>
<exclude name="kotlin/internal/**"/>
</fileset>
<fileset dir="${basedir}/compiler/frontend.java/src" includes="META-INF/services/**"/>
<fileset dir="${basedir}/compiler/backend/src" includes="META-INF/services/**"/>
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
<fileset dir="${output}/classes/stdlib"/>
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
<fileset dir="${output}/classes/stdlib"/>
<!-- icons, etc. -->
<fileset dir="idea/resources"/>
<!-- plugin.xml and friends -->
<fileset dir="idea/src" includes="META-INF/**"/>
</jar>
<sleep seconds="1"/>
<jar jarfile="${output}/kotlin-for-upsource.jar">
<zipfileset src="${output}/kotlin-for-upsource0.jar">
<exclude name="javax/**/*.java"/>
</zipfileset>
</jar>
<delete file="${output}/kotlin-for-upsource0.jar"/>
<!-- icons, etc. -->
<fileset dir="idea/resources"/>
<!-- plugin.xml and friends -->
<fileset dir="idea/src" includes="META-INF/**"/>
</jar>
<sleep seconds="1"/>
<jar jarfile="${output}/kotlin-for-upsource.jar">
<zipfileset src="${output}/kotlin-for-upsource0.jar">
<exclude name="javax/**/*.java"/>
</zipfileset>
</jar>
<delete file="${output}/kotlin-for-upsource0.jar"/>
</target>
<target name="build-artifacts" depends="zip,kotlin-for-upsource"/>
+160 -160
View File
@@ -3,20 +3,20 @@
<property name="public.buildserver.build.id" value="149643"/>
<condition property="os.tag" value="win.zip">
<os family="windows" />
<os family="windows"/>
</condition>
<condition property="os.tag" value="mac.zip">
<os family="mac" />
<os family="mac"/>
</condition>
<condition property="os.tag" value="tar.gz">
<and>
<os family="unix" />
<not>
<os family="mac"/>
</not>
</and>
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<property name="idea.build.number" value="138.SNAPSHOT"/>
@@ -30,29 +30,25 @@
<target name="update" depends="fetch-third-party,fetch-annotations" description="Update dependencies from public server">
<execute_update
base.url="http://teamcity.jetbrains.com/guestAuth/repository/download/bt410/${public.buildserver.build.id}:id"
build.zip="${idea.archive.name}"
/>
build.zip="${idea.archive.name}"/>
</target>
<target name="jb_update" depends="fetch-third-party,fetch-annotations" description="Update dependencies from internal server">
<execute_update
base.url="http://buildserver.labs.intellij.net/guestAuth/repository/download/bt3498/${jb.buildserver.build.id}:id"
build.zip="${idea.archive.name}"
/>
build.zip="${idea.archive.name}"/>
</target>
<target name="jb_update_continuous_local" depends="fetch-third-party,fetch-annotations">
<execute_update
base.url="http://buildserver.labs.intellij.net/guestAuth/repository/download/ijplatform_IjPlatform13_IdeaTrunk_Installers/${continuous.idea.version}"
build.zip="ideaIC-{build.number}.win.zip"
/>
build.zip="ideaIC-{build.number}.win.zip"/>
</target>
<target name="jb_update_continuous" depends="fetch-third-party,fetch-annotations">
<execute_update
base.url="file:///${basedir}/idea_artifacts"
build.zip="${idea.archive.name}"
/>
build.zip="${idea.archive.name}"/>
</target>
<macrodef name="get-maven-library">
@@ -72,8 +68,7 @@
<if>
<istrue value="@{bin}"/>
<then>
<get src="@{server}/@{path}.jar"
dest="@{download}/@{jar.name.base}.jar" usetimestamp="true"/>
<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>
@@ -81,28 +76,28 @@
<if>
<istrue value="@{src}"/>
<then>
<get src="@{server}/@{path}-sources.jar"
dest="@{download}/@{jar.name.base}-sources.jar" usetimestamp="true"/>
<copy file="@{download}/@{jar.name.base}-sources.jar" tofile="@{dependencies}/@{target.jar.name.base}-sources.jar" overwrite="true"/>
<get src="@{server}/@{path}-sources.jar" dest="@{download}/@{jar.name.base}-sources.jar" usetimestamp="true"/>
<copy file="@{download}/@{jar.name.base}-sources.jar" tofile="@{dependencies}/@{target.jar.name.base}-sources.jar"
overwrite="true"/>
</then>
</if>
</sequential>
</macrodef>
<macrodef name="get-ant-library">
<attribute name="version"/>
<attribute name="folderName"/>
<sequential>
<get src="http://archive.apache.org/dist/ant/binaries/apache-ant-@{version}-bin.tar.gz"
dest="dependencies/download/apache-ant-@{version}-bin.tar.gz" usetimestamp="true"/>
<attribute name="version"/>
<attribute name="folderName"/>
<sequential>
<get src="http://archive.apache.org/dist/ant/binaries/apache-ant-@{version}-bin.tar.gz"
dest="dependencies/download/apache-ant-@{version}-bin.tar.gz" usetimestamp="true"/>
<get src="http://archive.apache.org/dist/ant/source/apache-ant-@{version}-src.zip"
dest="dependencies/apache-ant-@{version}-src.zip" usetimestamp="true"/>
<get src="http://archive.apache.org/dist/ant/source/apache-ant-@{version}-src.zip"
dest="dependencies/apache-ant-@{version}-src.zip" usetimestamp="true"/>
<delete dir="dependencies/@{folderName}" failonerror="false"/>
<untar src="dependencies/download/apache-ant-@{version}-bin.tar.gz" dest="dependencies" compression="gzip"/>
<move file="dependencies/apache-ant-@{version}" tofile="dependencies/@{folderName}"/>
</sequential>
<delete dir="dependencies/@{folderName}" failonerror="false"/>
<untar src="dependencies/download/apache-ant-@{version}-bin.tar.gz" dest="dependencies" compression="gzip"/>
<move file="dependencies/apache-ant-@{version}" tofile="dependencies/@{folderName}"/>
</sequential>
</macrodef>
<target name="fetch-third-party">
@@ -147,9 +142,9 @@
<!-- jflex 1.4 -->
<mkdir dir="dependencies/jflex"/>
<get src="https://raw.github.com/JetBrains/intellij-community/master/tools/lexer/jflex-1.4/lib/JFlex.jar"
dest="dependencies/jflex/JFlex.jar" usetimestamp="true" />
dest="dependencies/jflex/JFlex.jar" usetimestamp="true"/>
<get src="https://raw.github.com/JetBrains/intellij-community/master/tools/lexer/idea-flex.skeleton"
dest="dependencies/jflex/idea-flex.skeleton" usetimestamp="true" />
dest="dependencies/jflex/idea-flex.skeleton" usetimestamp="true"/>
<!-- jline -->
<get-maven-library prefix="jline" lib="jline" version="2.9" target.jar.name.base="jline"/>
@@ -164,7 +159,7 @@
<!-- ASM -->
<get src="https://raw.github.com/JetBrains/intellij-community/master/lib/src/asm5-src.zip"
dest="dependencies/asm5-src.zip" />
dest="dependencies/asm5-src.zip"/>
<!-- <get-asm-sources-and-rename-packages asm.version="5.0.1"/> -->
<!-- Junit Sources -->
@@ -194,10 +189,10 @@
<get src="http://dl-ssl.google.com/android/repository/android-19_r02.zip"
dest="dependencies/download/android-sdk.zip" usetimestamp="true"/>
<unzip src="dependencies/download/android-sdk.zip" dest="dependencies">
<patternset>
<include name="**/android.jar"/>
</patternset>
<mapper type="flatten"/>
<patternset>
<include name="**/android.jar"/>
</patternset>
<mapper type="flatten"/>
</unzip>
<!-- Bootstrap compiler -->
@@ -219,7 +214,7 @@
</target>
<macrodef name="get-asm-sources-and-rename-packages">
<attribute name="asm.version" />
<attribute name="asm.version"/>
<sequential>
<!-- Download ASM sources -->
<get-maven-library prefix="org/ow2/asm" lib="asm-debug-all" version="@{asm.version}" bin="false"/>
@@ -239,7 +234,7 @@
</replaceregexp>
<move file="dependencies/download/asm-src/org/objectweb/asm"
tofile="dependencies/download/asm-src/org/jetbrains/org/objectweb/asm"/>
tofile="dependencies/download/asm-src/org/jetbrains/org/objectweb/asm"/>
<zip destfile="dependencies/jetbrains-asm-all-@{asm.version}-src.zip" basedir="dependencies/download/asm-src"/>
</sequential>
@@ -272,7 +267,8 @@
<mkdir dir="${jps}"/>
<mkdir dir="${jps-test}"/>
<get src="@{base.url.for.core}/core/intellij-core.jar" dest="${core}/intellij-core.jar" usetimestamp="true"/>
<get src="@{base.url.for.core}/core/intellij-core-analysis.jar" dest="${core-analysis}/intellij-core-analysis.jar" usetimestamp="true"/>
<get src="@{base.url.for.core}/core/intellij-core-analysis.jar" dest="${core-analysis}/intellij-core-analysis.jar"
usetimestamp="true"/>
<get src="@{base.url}/core/annotations.jar" dest="${core}/annotations.jar" usetimestamp="true"/>
<get src="@{base.url}/core/guava-17.0.jar" dest="${core}/guava-17.0.jar" usetimestamp="true"/>
<get src="@{base.url}/core/picocontainer.jar" dest="${core}/picocontainer.jar" usetimestamp="true"/>
@@ -281,30 +277,31 @@
<get src="@{base.url}/jps/standalone-jps-IC-${idea.build.number}.zip"
dest="dependencies/download/standalone-jps.zip"
usetimestamp="true" />
usetimestamp="true"/>
<property name="jps.extracted.dir" value="dependencies/download/standalone-jps" />
<unzip src="dependencies/download/standalone-jps.zip" dest="${jps.extracted.dir}" />
<property name="jps.extracted.dir" value="dependencies/download/standalone-jps"/>
<unzip src="dependencies/download/standalone-jps.zip" dest="${jps.extracted.dir}"/>
<copy todir="${jps}" flatten="true">
<resources>
<file file="${jps.extracted.dir}/groovy-jps-plugin.jar" />
<file file="${jps.extracted.dir}/groovy_rt.jar" />
<file file="${jps.extracted.dir}/jdom.jar" />
<file file="${jps.extracted.dir}/jgoodies-forms.jar" />
<file file="${jps.extracted.dir}/jna.jar" />
<file file="${jps.extracted.dir}/jps-builders.jar" />
<file file="${jps.extracted.dir}/jps-model.jar" />
<file file="${jps.extracted.dir}/log4j.jar" />
<file file="${jps.extracted.dir}/nanoxml-2.2.3.jar" />
<file file="${jps.extracted.dir}/protobuf-2.5.0.jar" />
<file file="${jps.extracted.dir}/trove4j.jar" />
<file file="${jps.extracted.dir}/ui-designer-jps-plugin.jar" />
<file file="${jps.extracted.dir}/util.jar" />
</resources>
<resources>
<file file="${jps.extracted.dir}/groovy-jps-plugin.jar"/>
<file file="${jps.extracted.dir}/groovy_rt.jar"/>
<file file="${jps.extracted.dir}/jdom.jar"/>
<file file="${jps.extracted.dir}/jgoodies-forms.jar"/>
<file file="${jps.extracted.dir}/jna.jar"/>
<file file="${jps.extracted.dir}/jps-builders.jar"/>
<file file="${jps.extracted.dir}/jps-model.jar"/>
<file file="${jps.extracted.dir}/log4j.jar"/>
<file file="${jps.extracted.dir}/nanoxml-2.2.3.jar"/>
<file file="${jps.extracted.dir}/protobuf-2.5.0.jar"/>
<file file="${jps.extracted.dir}/trove4j.jar"/>
<file file="${jps.extracted.dir}/ui-designer-jps-plugin.jar"/>
<file file="${jps.extracted.dir}/util.jar"/>
</resources>
</copy>
<get src="@{base.url}/jps/jps-build-test-IC-${idea.build.number}.jar" dest="${jps-test}/jps-build-test.jar" usetimestamp="true"/>
<get src="@{base.url}/jps/jps-build-test-IC-${idea.build.number}.jar" dest="${jps-test}/jps-build-test.jar"
usetimestamp="true"/>
<get src="@{base.url}/@{build.zip}" dest="dependencies/download/@{build.zip}" usetimestamp="true"/>
@@ -357,7 +354,7 @@
<copy file="ideaSDK/lib/log4j.jar" todir="${core}"/>
<copy file="ideaSDK/lib/xstream-1.4.3.jar" todir="${core}"/>
<copy file="ideaSDK/lib/xpp3-1.1.4-min.jar" todir="${core}"/>
<copy file="ideaSDK/lib/jsr166e.jar" todir="${core}" />
<copy file="ideaSDK/lib/jsr166e.jar" todir="${core}"/>
<copy file="ideaSDK/lib/asm-all.jar" todir="${core}"/>
<!-- TODO temporary workaround since util-rt is not packaged into intellij-core.jar -->
@@ -373,117 +370,120 @@
</macrodef>
<target name="fetch-annotations">
<mkdir dir="dependencies/annotations"/>
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_KAnnotator_InferJdkAnnotations/shipWithKotlin.tcbuildtag/kotlin-jdk-annotations.jar"
dest="dependencies/annotations/kotlin-jdk-annotations.jar" usetimestamp="true"/>
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_KAnnotator_InferJdkAnnotations/shipWithKotlin.tcbuildtag/kotlin-android-sdk-annotations.jar"
dest="dependencies/annotations/kotlin-android-sdk-annotations.jar" usetimestamp="true"/>
<mkdir dir="dependencies/annotations"/>
<get
src="http://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_KAnnotator_InferJdkAnnotations/shipWithKotlin.tcbuildtag/kotlin-jdk-annotations.jar"
dest="dependencies/annotations/kotlin-jdk-annotations.jar" usetimestamp="true"/>
<get
src="http://teamcity.jetbrains.com/guestAuth/repository/download/Kotlin_KAnnotator_InferJdkAnnotations/shipWithKotlin.tcbuildtag/kotlin-android-sdk-annotations.jar"
dest="dependencies/annotations/kotlin-android-sdk-annotations.jar" usetimestamp="true"/>
</target>
<target name="get_android_studio">
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
<condition property="android.os.tag" value="windows">
<os family="windows" />
</condition>
<condition property="android.os.tag" value="windows">
<os family="windows"/>
</condition>
<condition property="android.os.tag" value="mac">
<os family="mac" />
</condition>
<condition property="android.os.tag" value="linux">
<and>
<os family="unix" />
<not>
<condition property="android.os.tag" value="mac">
<os family="mac"/>
</not>
</and>
</condition>
</condition>
<if>
<not>
<and>
<isset property="android.version"/>
<isset property="android.build.version"/>
</and>
</not>
<then>
<loadresource property="android.version">
<url url="http://tools.android.com/download/studio/canary/latest"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex
pattern="^(.*)http://dl\.google\.com/dl/android/studio/ide-zips/([\d\.]+)/android-studio-ide(.*)$"
replace="\2" flags="s"/>
</tokenfilter>
</filterchain>
</loadresource>
<loadresource property="android.build.version">
<url url="http://tools.android.com/download/studio/canary/latest"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex
pattern="^(.*)http://dl\.google\.com/dl/android/studio/ide-zips/[\d\.]+/android-studio-ide-([\d\.]+)-(.*)$"
replace="\2" flags="s"/>
</tokenfilter>
</filterchain>
</loadresource>
</then>
</if>
<condition property="android.os.tag" value="linux">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<echo message="Download android studio: ${android.version} ${android.build.version}" />
<if>
<not>
<and>
<isset property="android.version"/>
<isset property="android.build.version"/>
</and>
</not>
<then>
<loadresource property="android.version">
<url url="http://tools.android.com/download/studio/canary/latest"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex
pattern="^(.*)http://dl\.google\.com/dl/android/studio/ide-zips/([\d\.]+)/android-studio-ide(.*)$"
replace="\2" flags="s"/>
</tokenfilter>
</filterchain>
</loadresource>
<loadresource property="android.build.version">
<url url="http://tools.android.com/download/studio/canary/latest"/>
<filterchain>
<tokenfilter>
<filetokenizer/>
<replaceregex
pattern="^(.*)http://dl\.google\.com/dl/android/studio/ide-zips/[\d\.]+/android-studio-ide-([\d\.]+)-(.*)$"
replace="\2" flags="s"/>
</tokenfilter>
</filterchain>
</loadresource>
</then>
</if>
<property name="android.file.name" value="android-studio-ide-${android.build.version}-${android.os.tag}.zip" />
<property name="android.studio.url" value="http://dl.google.com/dl/android/studio/ide-zips/${android.version}/${android.file.name}"/>
<property name="android.destination.dir" value="android-studio/sdk" />
<echo message="Download android studio: ${android.version} ${android.build.version}"/>
<mkdir dir="dependencies/download"/>
<property name="android.file.name" value="android-studio-ide-${android.build.version}-${android.os.tag}.zip"/>
<property name="android.studio.url"
value="http://dl.google.com/dl/android/studio/ide-zips/${android.version}/${android.file.name}"/>
<property name="android.destination.dir" value="android-studio/sdk"/>
<get src="${android.studio.url}" dest="dependencies/download" usetimestamp="true"/>
<mkdir dir="dependencies/download"/>
<delete dir="${android.destination.dir}" failonerror="false" includeemptydirs="true">
<exclude name="config/**"/>
<exclude name="system/**"/>
</delete>
<get src="${android.studio.url}" dest="dependencies/download" usetimestamp="true"/>
<unzip src="dependencies/download/${android.file.name}" dest="${android.destination.dir}">
<cutdirsmapper dirs="1"/>
</unzip>
<delete dir="${android.destination.dir}" failonerror="false" includeemptydirs="true">
<exclude name="config/**"/>
<exclude name="system/**"/>
</delete>
<if>
<matches pattern=".+windows\.zip" string="${android.file.name}"/>
<then>
</then>
<elseif>
<matches pattern=".+mac\.zip" string="${android.file.name}"/>
<then>
<exec executable="chmod">
<arg value="a+x"/>
<arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/>
<arg path="${android.destination.dir}/bin/printenv.py"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/>
</exec>
</then>
</elseif>
<elseif>
<matches pattern=".+linux\.zip" string="${android.file.name}"/>
<then>
<exec executable="chmod">
<arg value="a+x"/>
<arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/fsnotifier64"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/>
<arg path="${android.destination.dir}/bin/studio.sh"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/>
</exec>
</then>
</elseif>
<else>
<fail message="File name '${android.file.name}' wasn't matched"/>
</else>
</if>
<unzip src="dependencies/download/${android.file.name}" dest="${android.destination.dir}">
<cutdirsmapper dirs="1"/>
</unzip>
<if>
<matches pattern=".+windows\.zip" string="${android.file.name}"/>
<then>
</then>
<elseif>
<matches pattern=".+mac\.zip" string="${android.file.name}"/>
<then>
<exec executable="chmod">
<arg value="a+x"/>
<arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/>
<arg path="${android.destination.dir}/bin/printenv.py"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/>
</exec>
</then>
</elseif>
<elseif>
<matches pattern=".+linux\.zip" string="${android.file.name}"/>
<then>
<exec executable="chmod">
<arg value="a+x"/>
<arg path="${android.destination.dir}/bin/fsnotifier"/>
<arg path="${android.destination.dir}/bin/fsnotifier64"/>
<arg path="${android.destination.dir}/bin/inspect.sh"/>
<arg path="${android.destination.dir}/bin/studio.sh"/>
<arg path="${android.destination.dir}/bin/update_studio.sh"/>
</exec>
</then>
</elseif>
<else>
<fail message="File name '${android.file.name}' wasn't matched"/>
</else>
</if>
</target>
</project>