e3643fd222
There are too many notes in our logs, we never read them, and logs get very tedious to scroll through.
583 lines
24 KiB
XML
583 lines
24 KiB
XML
<project name="Kotlin" default="dist">
|
|
|
|
<!-- Set to false to disable proguard run on kotlin-compiler.jar. Speeds up the build -->
|
|
<property name="shrink" value="true"/>
|
|
<!-- Set to false to disable compiler's javadoc generation. Speeds up the build -->
|
|
<property name="generate.javadoc" value="true"/>
|
|
|
|
<property name="output.relative" value="dist"/>
|
|
<property name="output" value="${basedir}/${output.relative}"/>
|
|
<property name="kotlin-home" value="${output}/kotlinc"/>
|
|
<property name="build.number" value="snapshot"/>
|
|
<property name="output.name" value="kotlin-compiler-${build.number}"/>
|
|
<property name="idea.sdk" value="${basedir}/ideaSDK"/>
|
|
|
|
<path id="classpath">
|
|
<fileset dir="${idea.sdk}" includes="core/*.jar"/>
|
|
|
|
<fileset dir="${basedir}/lib" includes="**/*.jar"/>
|
|
<fileset dir="${basedir}/dependencies" includes="jline.jar"/>
|
|
<fileset dir="${basedir}/dependencies" includes="jansi.jar"/>
|
|
<fileset dir="${basedir}/js/js.translator/lib" includes="*.jar"/>
|
|
</path>
|
|
|
|
<dirset id="compilerSources.dirset" dir="${basedir}/">
|
|
<include name="compiler/frontend/src"/>
|
|
<include name="compiler/frontend.java/src"/>
|
|
<include name="compiler/backend/src"/>
|
|
<include name="compiler/cli/src"/>
|
|
<include name="compiler/cli/cli-common/src"/>
|
|
<include name="compiler/util/src"/>
|
|
<!--<include name="j2k/src"/>-->
|
|
<include name="compiler/jet.as.java.psi/src"/>
|
|
|
|
<include name="runtime/src"/>
|
|
|
|
<include name="js/js.translator/src"/>
|
|
</dirset>
|
|
|
|
<property name="idea.out" value="${basedir}/out/production"/>
|
|
<patternset id="compilerClassesFromIDEA.fileset">
|
|
<include name="frontend/**"/>
|
|
<include name="frontend.java/**"/>
|
|
<include name="backend/**"/>
|
|
<include name="cli/**"/>
|
|
<include name="cli-common/**"/>
|
|
<include name="util/**"/>
|
|
<include name="jet.as.java.psi/**"/>
|
|
|
|
<include name="runtime/**"/>
|
|
|
|
<include name="js.translator/**"/>
|
|
</patternset>
|
|
|
|
<path id="compilerSources.path">
|
|
<dirset refid="compilerSources.dirset"/>
|
|
</path>
|
|
|
|
<path id="preloaderSources.path">
|
|
<dirset dir="compiler/preloader/src"/>
|
|
</path>
|
|
|
|
<macrodef name="cleandir">
|
|
<attribute name="dir"/>
|
|
|
|
<sequential>
|
|
<echo message="Cleaning @{dir}"/>
|
|
<delete dir="@{dir}" failonerror="false"/>
|
|
<mkdir dir="@{dir}"/>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="clean">
|
|
<delete dir="${output}"/>
|
|
</target>
|
|
|
|
<target name="init">
|
|
<mkdir dir="${kotlin-home}"/>
|
|
<mkdir dir="${kotlin-home}/lib"/>
|
|
<mkdir dir="${kotlin-home}/lib/tools"/>
|
|
</target>
|
|
|
|
<target name="prepareDist">
|
|
<copy todir="${kotlin-home}/bin">
|
|
<fileset dir="${basedir}/compiler/cli/bin"/>
|
|
</copy>
|
|
<fixcrlf srcdir="${kotlin-home}/bin" excludes="**/*.bat" eol="unix"/>
|
|
|
|
<copy todir="${kotlin-home}/license">
|
|
<fileset dir="${basedir}/license"/>
|
|
</copy>
|
|
|
|
<echo file="${kotlin-home}/build.txt" message="${build.number}"/>
|
|
|
|
<chmod dir="${kotlin-home}/bin" includes="*" perm="755"/>
|
|
</target>
|
|
|
|
<target name="compileGenerators">
|
|
<cleandir dir="${output}/classes/generators"/>
|
|
<javac destdir="${output}/classes/generators" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
|
<src path="injector-generator/src"/>
|
|
<src path="generators/org/jetbrains/jet/generators/injectors"/>
|
|
<src path="generators/org/jetbrains/jet/generators/jvm"/>
|
|
<src refid="compilerSources.path"/>
|
|
<classpath refid="classpath"/>
|
|
</javac>
|
|
<copy todir="${output}/classes/generators">
|
|
<fileset dir="compiler/frontend/src" includes="**/*.jet"/>
|
|
</copy>
|
|
</target>
|
|
|
|
<target name="invokeGenerators" depends="compileGenerators">
|
|
<java classname="org.jetbrains.jet.generators.injectors.GenerateInjectors" failonerror="true">
|
|
<classpath refid="classpath"/>
|
|
<classpath path="${output}/classes/generators"/>
|
|
</java>
|
|
<java classname="org.jetbrains.jet.generators.jvm.GenerateJavaToKotlinMethodMap" failonerror="true">
|
|
<classpath refid="classpath"/>
|
|
<classpath path="${output}/classes/generators"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="compilerSources">
|
|
<jar jarfile="${output}/kotlin-compiler-sources.jar">
|
|
<!-- TODO How to convert it from pathset or dirset ? -->
|
|
<fileset dir="compiler/frontend/src"/>
|
|
<fileset dir="compiler/frontend.java/src"/>
|
|
<fileset dir="compiler/backend/src"/>
|
|
<fileset dir="compiler/cli/src"/>
|
|
<fileset dir="j2k/src"/>
|
|
<fileset dir="compiler/util/src"/>
|
|
<fileset dir="compiler/jet.as.java.psi/src"/>
|
|
<fileset dir="runtime/src"/>
|
|
<fileset dir="js/js.translator/src"/>
|
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Compiler Sources"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
</manifest>
|
|
</jar>
|
|
|
|
<if>
|
|
<istrue value="${generate.javadoc}"/>
|
|
|
|
<then>
|
|
<delete dir="${output}/kotlin-compiler-javadoc" failonerror="false"/>
|
|
<javadoc destdir="${output}/kotlin-compiler-javadoc"
|
|
sourcepathref="compilerSources.path"
|
|
classpathref="classpath"
|
|
linksource="yes"
|
|
windowtitle="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="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Compiler Javadoc"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
</manifest>
|
|
</jar>
|
|
</then>
|
|
|
|
<else>
|
|
<jar jarfile="${output}/kotlin-compiler-javadoc.jar">
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Compiler Javadoc"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
</manifest>
|
|
</jar>
|
|
</else>
|
|
</if>
|
|
</target>
|
|
|
|
<target name="jslib">
|
|
<jar jarfile="${kotlin-home}/lib/kotlin-jslib.jar">
|
|
<fileset dir="${basedir}/js/js.libraries/src">
|
|
<include name="core/**"/>
|
|
<include name="jquery/**"/>
|
|
<include name="dom/**"/>
|
|
<include name="html5/**"/>
|
|
<include name="stdlib/TuplesCode.kt"/>
|
|
</fileset>
|
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin JavaScript StdLib"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
</manifest>
|
|
</jar>
|
|
<java classname="com.google.javascript.jscomp.CommandLineRunner" failonerror="true">
|
|
<classpath>
|
|
<pathelement location="${basedir}\js\js.tests\testLib\closure-compiler.jar"/>
|
|
</classpath>
|
|
<arg value="--formatting"/>
|
|
<arg value="PRETTY_PRINT"/>
|
|
<arg value="--language_in"/>
|
|
<arg value="ECMASCRIPT5_STRICT"/>
|
|
<arg value="--compilation_level"/>
|
|
<arg value="SIMPLE_OPTIMIZATIONS"/>
|
|
<arg value="--js"/>
|
|
<arg value="${basedir}/js/js.translator/testFiles/kotlin_lib_ecma5.js"/>
|
|
<arg value="--js"/>
|
|
<arg value="${basedir}/js/js.translator/testFiles/kotlin_lib.js"/>
|
|
<arg value="--js"/>
|
|
<arg value="${basedir}/js/js.translator/testFiles/maps.js"/>
|
|
<arg value="--js_output_file"/>
|
|
<arg value="${kotlin-home}/lib/kotlinEcma5.js"/>
|
|
</java>
|
|
<java classname="com.google.javascript.jscomp.CommandLineRunner" failonerror="true">
|
|
<classpath>
|
|
<pathelement location="${basedir}/js/js.tests/testLib/closure-compiler.jar"/>
|
|
</classpath>
|
|
<arg value="--formatting"/>
|
|
<arg value="PRETTY_PRINT"/>
|
|
<arg value="--language_in"/>
|
|
<arg value="ECMASCRIPT3"/>
|
|
<arg value="--compilation_level"/>
|
|
<arg value="SIMPLE_OPTIMIZATIONS"/>
|
|
<arg value="--js"/>
|
|
<arg value="${basedir}/js/js.translator/testFiles/kotlin_lib_ecma3.js"/>
|
|
<arg value="--js"/>
|
|
<arg value="${basedir}/js/js.translator/testFiles/kotlin_lib.js"/>
|
|
<arg value="--js"/>
|
|
<arg value="${basedir}/js/js.translator/testFiles/maps.js"/>
|
|
<arg value="--js_output_file"/>
|
|
<arg value="${kotlin-home}/lib/kotlinEcma3.js"/>
|
|
</java>
|
|
</target>
|
|
|
|
<target name="preloader">
|
|
<cleandir dir="${output}/classes/preloader"/>
|
|
<javac destdir="${output}/classes/preloader" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
|
<src refid="preloaderSources.path"/>
|
|
</javac>
|
|
|
|
<jar jarfile="${kotlin-home}/lib/kotlin-preloader.jar">
|
|
<fileset dir="${output}/classes/preloader"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Preloader"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
|
|
<attribute name="Main-Class" value="org.jetbrains.jet.preloading.Preloader"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<macrodef name="pack_compiler">
|
|
<attribute name="jarfile"/>
|
|
<attribute name="compress" default="true"/>
|
|
|
|
<sequential>
|
|
<jar jarfile="@{jarfile}" compress="@{compress}">
|
|
<fileset dir="${output}/classes/compiler"/>
|
|
<fileset dir="${basedir}/compiler/frontend/src" includes="jet/**"/>
|
|
|
|
<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}/js/js.translator/lib" includes="*.jar"/>
|
|
<zipgroupfileset dir="${basedir}/dependencies" includes="jline.jar"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Compiler"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
|
|
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
|
|
</manifest>
|
|
</jar>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="compiler_quick">
|
|
<delete dir="${output}/classes/compiler"/>
|
|
<copy todir="${output}/classes/compiler">
|
|
<fileset dir="${idea.out}/">
|
|
<patternset refid="compilerClassesFromIDEA.fileset"/>
|
|
</fileset>
|
|
<!-- out/production contains classes under module directories, here we are merging them all into one root-->
|
|
<cutdirsmapper dirs="1"/>
|
|
</copy>
|
|
<delete file="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
|
<pack_compiler jarfile="${kotlin-home}/lib/kotlin-compiler.jar" compress="false"/>
|
|
</target>
|
|
|
|
<target name="compiler">
|
|
<taskdef resource="proguard/ant/task.properties" classpath="${basedir}/dependencies/proguard.jar"/>
|
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
|
|
|
|
<cleandir dir="${output}/classes/compiler"/>
|
|
<javac destdir="${output}/classes/compiler" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
|
<src refid="compilerSources.path"/>
|
|
<classpath refid="classpath"/>
|
|
</javac>
|
|
|
|
<pack_compiler jarfile="${output}/kotlin-compiler-before-shrink.jar"/>
|
|
|
|
<delete file="${kotlin-home}/lib/kotlin-compiler.jar" failonerror="false"/>
|
|
|
|
<if>
|
|
<isfalse value="${shrink}"/>
|
|
|
|
<then>
|
|
<copy file="${output}/kotlin-compiler-before-shrink.jar"
|
|
tofile="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
|
</then>
|
|
|
|
<else>
|
|
<available property="rtjar" value="${java.home}/lib/rt.jar" file="${java.home}/lib/rt.jar"/>
|
|
<available property="rtjar" value="${java.home}/../Classes/classes.jar" file="${java.home}/../Classes/classes.jar"/>
|
|
|
|
<proguard><![CDATA[
|
|
-injars '${output}/kotlin-compiler-before-shrink.jar'(
|
|
!com/thoughtworks/xstream/converters/extended/ISO8601**,
|
|
!com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter**,
|
|
!com/thoughtworks/xstream/io/xml/Dom4J**,
|
|
!com/thoughtworks/xstream/io/xml/Xom**,
|
|
!com/thoughtworks/xstream/io/xml/Wstx**,
|
|
!com/thoughtworks/xstream/io/xml/KXml2**,
|
|
!com/thoughtworks/xstream/io/xml/BEAStax**,
|
|
!com/thoughtworks/xstream/io/json/Jettison**,
|
|
!com/thoughtworks/xstream/mapper/CGLIBMapper**,
|
|
!org/apache/log4j/jmx/Agent*,
|
|
!org/apache/log4j/net/JMS*,
|
|
!org/apache/log4j/net/SMTP*,
|
|
!org/apache/log4j/or/jms/MessageRenderer*,
|
|
!org/jdom/xpath/Jaxen*,
|
|
!org/mozilla/javascript/xml/impl/xmlbeans/**,
|
|
!META-INF/maven**,
|
|
**.class,**.properties,**.jet,**.kt,
|
|
META-INF/services/**,META-INF/native/**,META-INF/MANIFEST.MF,
|
|
messages/**)
|
|
|
|
-outjars '${kotlin-home}/lib/kotlin-compiler.jar'
|
|
|
|
-dontnote **
|
|
-dontwarn com.intellij.util.ui.IsRetina*
|
|
-dontwarn com.intellij.util.RetinaImage*
|
|
-dontwarn apple.awt.*
|
|
-dontwarn dk.brics.automaton.*
|
|
-dontwarn org.fusesource.**
|
|
-dontwarn org.xerial.snappy.SnappyBundleActivator
|
|
-dontwarn com.intellij.util.CompressionUtil
|
|
-dontwarn com.intellij.util.SnappyInitializer
|
|
|
|
-libraryjars '${rtjar}'
|
|
|
|
-target 1.6
|
|
-dontoptimize
|
|
-dontobfuscate
|
|
|
|
-keep class org.fusesource.** { *; }
|
|
-keep class org.jdom.input.JAXPParserFactory { *; }
|
|
|
|
-keep class org.jetbrains.annotations.** {
|
|
public protected *;
|
|
}
|
|
|
|
-keep class org.jetbrains.k2js.** {
|
|
public protected *;
|
|
}
|
|
|
|
-keep class org.jetbrains.jet.** {
|
|
public protected *;
|
|
}
|
|
|
|
-keep class jet.** {
|
|
public protected *;
|
|
}
|
|
|
|
-keep class com.intellij.psi.** {
|
|
public protected *;
|
|
}
|
|
|
|
# for kdoc
|
|
-keep class com.intellij.openapi.util.TextRange { *; }
|
|
|
|
-keepclassmembers enum * {
|
|
public static **[] values();
|
|
public static ** valueOf(java.lang.String);
|
|
}
|
|
|
|
-keepclassmembers class * {
|
|
** toString();
|
|
** hashCode();
|
|
void start();
|
|
void stop();
|
|
void dispose();
|
|
}
|
|
]]></proguard>
|
|
</else>
|
|
</if>
|
|
</target>
|
|
|
|
<target name="antTools">
|
|
<cleandir dir="${output}/classes/buildTools"/>
|
|
<javac destdir="${output}/classes/buildTools" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
|
<src>
|
|
<dirset dir="${basedir}/build-tools">
|
|
<include name="core/src"/>
|
|
<include name="ant/src"/>
|
|
</dirset>
|
|
</src>
|
|
<compilerarg value="-Xlint:all"/>
|
|
<classpath>
|
|
<fileset dir="${kotlin-home}/lib" includes="kotlin-compiler.jar"/>
|
|
<fileset dir="${basedir}/dependencies" includes="ant.jar"/>
|
|
</classpath>
|
|
</javac>
|
|
|
|
<jar destfile="${kotlin-home}/lib/kotlin-ant.jar">
|
|
<fileset dir="${output}/classes/buildTools"/>
|
|
<fileset dir="${basedir}/build-tools/ant/src" includes="**/*.xml"/>
|
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Compiler Ant Tasks"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
|
|
<attribute name="Class-Path" value="kotlin-compiler.jar"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<target name="jdkAnnotations">
|
|
<pack_annotations jarfile="kotlin-jdk-annotations.jar"
|
|
annotationsdir="${basedir}/jdk-annotations"
|
|
title="Kotlin Compiler JDK Annotations"/>
|
|
</target>
|
|
|
|
<target name="androidSdkAnnotations">
|
|
<pack_annotations jarfile="kotlin-android-sdk-annotations.jar"
|
|
annotationsdir="${basedir}/android-sdk-annotations"
|
|
title="Kotlin Compiler Android SDK Annotations"/>
|
|
</target>
|
|
|
|
<macrodef name="pack_annotations">
|
|
<attribute name="annotationsdir"/>
|
|
<attribute name="jarfile"/>
|
|
<attribute name="title"/>
|
|
|
|
<sequential>
|
|
<jar destfile="${kotlin-home}/lib/@{jarfile}">
|
|
<fileset dir="@{annotationsdir}"/>
|
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="@{title}"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
</manifest>
|
|
</jar>
|
|
</sequential>
|
|
</macrodef>
|
|
|
|
<target name="annotationsExt">
|
|
<cleandir dir="${output}/classes/annotations-ext"/>
|
|
|
|
<javac destdir="${output}/classes/annotations-ext" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
|
<src path="${basedir}/compiler/annotations-ext/src"/>
|
|
</javac>
|
|
|
|
<jar destfile="${kotlin-home}/lib/kotlin-annotations-ext.jar">
|
|
<fileset dir="${output}/classes/annotations-ext"/>
|
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Extended Annotations"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<target name="runtime">
|
|
<cleandir dir="${output}/classes/runtime"/>
|
|
<javac destdir="${output}/classes/runtime" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
|
<src path="${basedir}/runtime/src"/>
|
|
</javac>
|
|
|
|
<cleandir dir="${output}/classes/stdlib"/>
|
|
<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>
|
|
<arg value="-src"/>
|
|
<arg value="${basedir}/libraries/stdlib/src"/>
|
|
<arg value="-output"/>
|
|
<arg value="${output}/classes/stdlib"/>
|
|
<arg value="-noStdlib"/>
|
|
<arg value="-classpath"/>
|
|
<arg value="${output}/classes/runtime"/>
|
|
</java>
|
|
|
|
<jar destfile="${kotlin-home}/lib/kotlin-runtime.jar">
|
|
<fileset dir="${output}/classes/runtime"/>
|
|
<fileset dir="${output}/classes/stdlib"/>
|
|
<fileset dir="${basedir}/runtime" includes="src/**/*"/>
|
|
<fileset dir="${basedir}/libraries/stdlib" includes="src/**/*"/>
|
|
<zipfileset file="${kotlin-home}/build.txt" prefix="META-INF"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Kotlin Compiler Runtime + StdLib"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<target name="j2kConverter">
|
|
<taskdef resource="net/sf/antcontrib/antcontrib.properties" classpath="${basedir}/dependencies/ant-contrib.jar"/>
|
|
|
|
<cleandir dir="${output}/classes/j2k"/>
|
|
|
|
<javac destdir="${output}/classes/j2k" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
|
<src path="${basedir}/j2k/src"/>
|
|
<classpath path="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
|
</javac>
|
|
|
|
<jar jarfile="${kotlin-home}/lib/tools/j2k.jar">
|
|
<fileset dir="${output}/classes/j2k" includes="org/jetbrains/jet/j2k/**"/>
|
|
|
|
<manifest>
|
|
<attribute name="Built-By" value="JetBrains"/>
|
|
|
|
<attribute name="Implementation-Vendor" value="JetBrains"/>
|
|
<attribute name="Implementation-Title" value="Java to Kotlin Converter"/>
|
|
<attribute name="Implementation-Version" value="${build.number}"/>
|
|
|
|
<attribute name="Main-Class" value="org.jetbrains.jet.j2k.JavaToKotlinTranslator"/>
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
|
|
<!-- builds redistributables from sources -->
|
|
<target name="dist"
|
|
depends="clean,init,prepareDist,compileGenerators,invokeGenerators,preloader,compiler,compilerSources,antTools,jdkAnnotations,androidSdkAnnotations,annotationsExt,runtime,jslib,j2kConverter"/>
|
|
|
|
<!-- builds everything, but classes are reused from project out dir, doesn't run proguard and javadoc -->
|
|
<target name="dist_quick"
|
|
depends="clean,init,prepareDist,preloader,compiler_quick,antTools,jdkAnnotations,androidSdkAnnotations,annotationsExt,runtime,jslib,j2kConverter"/>
|
|
|
|
<!-- builds compiler jar from project out dir -->
|
|
<target name="dist_quick_compiler_only"
|
|
depends="init,prepareDist,preloader,compiler_quick"/>
|
|
|
|
<target name="zip" depends="dist">
|
|
<zip destfile="${output}/${output.name}.zip">
|
|
<zipfileset prefix="kotlinc" dir="${kotlin-home}"/>
|
|
</zip>
|
|
<echo message="##teamcity[publishArtifacts '${output.relative}/${output.name}.zip']"/>
|
|
</target>
|
|
</project>
|