Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

131 lines (112 sloc) 4.846 kB
<project name="Kotlin" default="dist">
<property name="output" value="${basedir}/dist"/>
<property name="kotlin-home" value="${output}/kotlinc"/>
<property name="build.number" value="snapshot"/>
<property name="output.name" value="kotlin-${build.number}"/>
<property name="idea.sdk" value="${basedir}/ideaSDK"/>
<import file="build-tools/build.xml" optional="false"/>
<path id="classpath">
<fileset dir="${idea.sdk}" includes="core/*.jar"/>
<fileset dir="${basedir}/lib" includes="*.jar"/>
<pathelement path="${output}/classes/runtime"/>
</path>
<path id="classpath.kotlin">
<path refid="classpath"/>
<pathelement path="${output}/classes/compiler"/>
</path>
<path id="sourcepath">
<dirset dir="${basedir}/compiler">
<include name="frontend/src"/>
<include name="frontend.java/src"/>
<include name="backend/src"/>
<include name="cli/src"/>
<include name="util/src"/>
<!--
<include name="jet.as.java.psi/src"/>
-->
</dirset>
</path>
<target name="init" depends="clean">
<mkdir dir="${kotlin-home}"/>
<mkdir dir="${kotlin-home}/lib"/>
<mkdir dir="${kotlin-home}/lib/alt"/>
</target>
<target name="compileRT" depends="init">
<mkdir dir="${output}/classes/runtime"/>
<javac destdir="${output}/classes/runtime" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<src path="${basedir}/stdlib/src"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="compileStdlib" depends="jar">
<mkdir dir="${output}/classes/stdlib"/>
<java classname="org.jetbrains.jet.cli.KotlinCompiler">
<classpath>
<path refid="classpath"/>
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
</classpath>
<arg value="-src"/>
<arg value="${basedir}/stdlib/ktSrc"/>
<arg value="-output"/>
<arg value="${output}/classes/stdlib"/>
</java>
</target>
<target name="compileJDKHeaders" depends="jar">
<mkdir dir="${output}/classes/stdlib"/>
<java classname="org.jetbrains.jet.cli.KotlinCompiler">
<classpath>
<path refid="classpath"/>
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
</classpath>
<arg value="-src"/>
<arg value="${basedir}/jdk-headers/src"/>
<arg value="-output"/>
<arg value="${output}/classes/jdk-headers"/>
<arg value="-ignoreErrors"/>
<arg value="-transformNamesToJava"/>
</java>
</target>
<target name="jarRT" depends="compile,compileStdlib">
<jar destfile="${kotlin-home}/lib/kotlin-runtime.jar">
<fileset dir="${output}/classes/runtime"/>
<fileset dir="${output}/classes/stdlib"/>
</jar>
</target>
<target name="jarJDKHeaders" depends="compile,compileJDKHeaders">
<jar destfile="${kotlin-home}/lib/alt/kotlin-jdk-headers.jar">
<fileset dir="${output}/classes/jdk-headers"/>
</jar>
</target>
<target name="compile" depends="compileRT">
<mkdir dir="${output}/classes/compiler"/>
<javac destdir="${output}/classes/compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
<src refid="sourcepath"/>
<classpath refid="classpath"/>
</javac>
</target>
<target name="jar" depends="compile">
<jar destfile="${kotlin-home}/lib//kotlin-compiler.jar">
<fileset dir="${output}/classes/compiler"/>
<fileset dir="${basedir}/compiler/frontend/src" includes="jet/**"/>
</jar>
</target>
<target name="clean">
<delete dir="${output}"/>
</target>
<target name="dist" depends="init,jarRT,jarJDKHeaders,jar,buildToolsJar">
<copy todir="${kotlin-home}/lib">
<fileset dir="${idea.sdk}/core" includes="*.jar"/>
<fileset dir="${basedir}/lib" includes="*.jar"/>
</copy>
</target>
<target name="zip" depends="dist">
<echo file="${kotlin-home}/build.txt" message="${build.number}"/>
<zip destfile="${output}/${output.name}.zip">
<zipfileset prefix="kotlinc" dir="${kotlin-home}"/>
<zipfileset prefix="kotlinc" file="${output}/build.txt"/>
<zipfileset prefix="kotlinc/license" dir="${basedir}/license"/>
<zipfileset prefix="kotlinc/bin" filemode="755" dir="${basedir}/compiler/cli/bin"/>
<zipfileset prefix="kotlinc/examples" dir="${basedir}/examples/src"/>
</zip>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.