reworked kotlin compiler dist
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
<property name="build.number" value="snapshot"/>
|
||||
<property name="output.name" value="kotlin-${build.number}"/>
|
||||
<property name="idea.sdk" value="${basedir}/ideaSDK"/>
|
||||
<!-- set to false for faster build -->
|
||||
|
||||
<import file="build-tools/build.xml" optional="false"/>
|
||||
|
||||
|
||||
<path id="classpath">
|
||||
<fileset dir="${idea.sdk}" includes="core/*.jar"/>
|
||||
@@ -21,115 +17,59 @@
|
||||
|
||||
<fileset dir="${basedir}/lib" includes="**/*.jar"/>
|
||||
<fileset dir="${basedir}/js/js.translator/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 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/util/src"/>
|
||||
<include name="compiler/jet.as.java.psi/src"/>
|
||||
|
||||
<include name="runtime/src"/>
|
||||
|
||||
<include name="js/js.translator/src"/>
|
||||
</dirset>
|
||||
<dirset dir="${basedir}/js/js.translator">
|
||||
<include name="src"/>
|
||||
</dirset>
|
||||
</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" 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}/runtime/src"/>
|
||||
<classpath refid="classpath"/>
|
||||
</javac>
|
||||
<target name="prepareDist">
|
||||
<copy todir="${kotlin-home}/bin">
|
||||
<fileset dir="${basedir}/compiler/cli/bin"/>
|
||||
</copy>
|
||||
|
||||
<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="compileStdlib" depends="jar,jarLang,compileRT">
|
||||
<mkdir 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="-mode"/>
|
||||
<arg value="stdlib"/>
|
||||
<arg value="-classpath"/>
|
||||
<arg value="${output}/classes/runtime"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="compileJDKHeaders" depends="jar,jarLang">
|
||||
<mkdir dir="${output}/classes/stdlib"/>
|
||||
<java classname="org.jetbrains.jet.cli.jvm.K2JVMCompiler" failonerror="true">
|
||||
<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="-mode"/>
|
||||
<arg value="jdkHeaders"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="compileLang" depends="jar">
|
||||
<mkdir dir="${output}/classes/lang"/>
|
||||
<java classname="org.jetbrains.jet.cli.jvm.K2JVMCompiler" failonerror="true">
|
||||
<classpath>
|
||||
<path refid="classpath"/>
|
||||
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
||||
</classpath>
|
||||
<arg value="-src"/>
|
||||
<arg value="${basedir}/compiler/frontend/src"/>
|
||||
<arg value="-output"/>
|
||||
<arg value="${output}/classes/lang"/>
|
||||
<arg value="-mode"/>
|
||||
<arg value="builtins"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="jarRT" depends="compile,copyKotlinJars,compileStdlib">
|
||||
<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/**/*"/>
|
||||
</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="jarLang" depends="compile,compileLang">
|
||||
<jar destfile="${kotlin-home}/lib/lang.jar">
|
||||
<fileset dir="${output}/classes/lang"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="compileInjectorsGenerator">
|
||||
<mkdir dir="${output}/classes/injectorsGenerator"/>
|
||||
<target name="injectorsGenerator">
|
||||
<cleandir dir="${output}/classes/injectorsGenerator"/>
|
||||
<javac destdir="${output}/classes/injectorsGenerator" debug="true" debuglevel="lines,vars,source" includeAntRuntime="false">
|
||||
<src path="injector-generator/src"/>
|
||||
<src refid="sourcepath"/>
|
||||
@@ -137,48 +77,27 @@
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="generateInjectors" depends="compileInjectorsGenerator">
|
||||
<target name="generateInjectors" depends="injectorsGenerator">
|
||||
<java classname="org.jetbrains.jet.di.AllInjectorsGenerator" failonerror="true">
|
||||
<classpath refid="classpath"/>
|
||||
<classpath path="${output}/classes/injectorsGenerator"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="compile" depends="compileRT,generateInjectors">
|
||||
<mkdir dir="${output}/classes/compiler"/>
|
||||
<target name="compiler">
|
||||
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${basedir}/dependencies/jarjar.jar"/>
|
||||
<taskdef resource="proguard/ant/task.properties" classpath="${basedir}/dependencies/proguard.jar"/>
|
||||
|
||||
<cleandir 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="compileTests" depends="dist">
|
||||
<mkdir dir="${output}/classes/tests"/>
|
||||
<javac destdir="${output}/classes/tests" debug="true" includeAntRuntime="false">
|
||||
<src path="compiler/tests"/>
|
||||
<classpath refid="classpath"/>
|
||||
<classpath location="${output}/classes/compiler"/>
|
||||
<classpath location="ideaSDK/lib/junit-4.10.jar"/>
|
||||
<classpath location="ideaSDK/lib/idea.jar"/>
|
||||
</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="jarjar" unless="nojarjar">
|
||||
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${basedir}/dependencies/jarjar.jar"/>
|
||||
<taskdef resource="proguard/ant/task.properties" classpath="${basedir}/dependencies/proguard.jar"/>
|
||||
|
||||
<!-- JarJar Kotlin compiler & dependencies -->
|
||||
<delete file="${output}/kotlin-compiler-jarjar.jar" failonerror="false"/>
|
||||
<jarjar jarfile="${output}/kotlin-compiler-jarjar.jar">
|
||||
<fileset dir="${output}/classes/compiler"/>
|
||||
<fileset dir="${output}/classes/runtime"/>
|
||||
<fileset dir="${basedir}/compiler/frontend/src" includes="jet/**"/>
|
||||
|
||||
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
|
||||
@@ -198,21 +117,20 @@
|
||||
|
||||
<zap pattern="org.jdom.xpath.Jaxen*"/>
|
||||
|
||||
<zap pattern="org.mozilla.javascript.xml.impl.xmlbeans.**" />
|
||||
<zap pattern="org.mozilla.javascript.xml.impl.xmlbeans.**"/>
|
||||
|
||||
<rule pattern="com.intellij.**" result="kotlinc.internal.com.intellij.@1"/>
|
||||
<rule pattern="com.sun.jna.**" result="kotlinc.internal.com.sun.jna.@1"/>
|
||||
<rule pattern="org.apache.log4j.**" result="kotlinc.internal.org.apache.log4j.@1"/>
|
||||
<rule pattern="org.jdom.**" result="kotlinc.internal.org.jdom.@1"/>
|
||||
<rule pattern="JDOMAbout**" result="kotlinc.internal.org.jdom.JDOMAbout@1"/>
|
||||
<rule pattern="org.intellij.lang.annotations.**" result="kotlinc.internal.org.intellij.lang.annotations.@1"/>
|
||||
<rule pattern="org.jetbrains.annotations.**" result="kotlinc.internal.org.jetbrains.annotations.@1"/>
|
||||
<rule pattern="com.google.**" result="kotlinc.internal.com.google.@1"/>
|
||||
<rule pattern="org.objectweb.asm.**" result="kotlinc.internal.org.objectweb.asm.@1"/>
|
||||
<rule pattern="com.sampullara.cli.**" result="kotlinc.internal.com.sampullara.cli.@1"/>
|
||||
<rule pattern="org.picocontainer.**" result="kotlinc.internal.org.picocontainer.@1"/>
|
||||
<rule pattern="gnu.trove.**" result="kotlinc.internal.gnu.trove.@1"/>
|
||||
<rule pattern="javax.inject.**" result="kotlinc.internal.javax.inject.@1"/>
|
||||
<rule pattern="com.intellij.**" result="org.jetbrains.jet.internal.com.intellij.@1"/>
|
||||
<rule pattern="com.sun.jna.**" result="org.jetbrains.jet.internal.com.sun.jna.@1"/>
|
||||
<rule pattern="org.apache.log4j.**" result="org.jetbrains.jet.internal.org.apache.log4j.@1"/>
|
||||
<rule pattern="org.jdom.**" result="org.jetbrains.jet.internal.org.jdom.@1"/>
|
||||
<rule pattern="JDOMAbout**" result="org.jetbrains.jet.internal.org.jdom.JDOMAbout@1"/>
|
||||
<rule pattern="org.intellij.lang.annotations.**" result="org.jetbrains.jet.internal.org.intellij.lang.annotations.@1"/>
|
||||
<rule pattern="com.google.**" result="org.jetbrains.jet.internal.com.google.@1"/>
|
||||
<rule pattern="org.objectweb.asm.**" result="org.jetbrains.jet.internal.org.objectweb.asm.@1"/>
|
||||
<rule pattern="com.sampullara.cli.**" result="org.jetbrains.jet.internal.com.sampullara.cli.@1"/>
|
||||
<rule pattern="org.picocontainer.**" result="org.jetbrains.jet.internal.org.picocontainer.@1"/>
|
||||
<rule pattern="gnu.trove.**" result="org.jetbrains.jet.internal.gnu.trove.@1"/>
|
||||
<rule pattern="javax.inject.**" result="org.jetbrains.jet.internal.javax.inject.@1"/>
|
||||
</jarjar>
|
||||
|
||||
<delete failonerror="false" dir="${output}/kotlin-compiler.exploded"/>
|
||||
@@ -222,8 +140,8 @@
|
||||
<delete file="${output}/kotlin-compiler-jarjar.jar"/>
|
||||
|
||||
<!-- Clean JarJar result -->
|
||||
<delete file="${output}/kotlin-compiler-clean.jar" failonerror="false"/>
|
||||
<jar jarfile="${output}/kotlin-compiler-clean.jar">
|
||||
<delete file="${output}/kotlin-compiler-before-proguard.jar.jar" failonerror="false"/>
|
||||
<jar jarfile="${output}/kotlin-compiler-before-proguard.jar.jar">
|
||||
<fileset dir="${output}/kotlin-compiler.exploded">
|
||||
<include name="**/*.class"/>
|
||||
<include name="**/*.jet"/>
|
||||
@@ -243,15 +161,15 @@
|
||||
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
|
||||
</manifest>
|
||||
</jar>
|
||||
<delete dir="${output}/kotlin-compiler.exploded" />
|
||||
<delete dir="${output}/kotlin-compiler.exploded"/>
|
||||
|
||||
<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" />
|
||||
<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"/>
|
||||
|
||||
<delete file="${output}/kotlin-compiler.jar" failonerror="false"/>
|
||||
<delete file="${kotlin-home}/lib/kotlin-compiler.jar" failonerror="false"/>
|
||||
<proguard><![CDATA[
|
||||
-injars '${output}/kotlin-compiler-clean.jar'
|
||||
-outjars '${output}/kotlin-compiler.jar'
|
||||
-injars '${output}/kotlin-compiler-before-proguard.jar.jar'
|
||||
-outjars '${kotlin-home}/lib/kotlin-compiler.jar'
|
||||
|
||||
-libraryjars '${rtjar}'
|
||||
|
||||
@@ -259,30 +177,48 @@
|
||||
-dontoptimize
|
||||
-dontobfuscate
|
||||
|
||||
# Keep application classes, along with their 'main' methods.
|
||||
-keepclasseswithmembers public class * {
|
||||
public static void main(java.lang.String[]);
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * {
|
||||
# Various dynamically called methods
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
void dispose();
|
||||
** getFileSystem();
|
||||
** isVarArgs();
|
||||
** getApplication();
|
||||
** finalizeReferent();
|
||||
** newBuilder();
|
||||
** startFinalizer(java.lang.Class,java.lang.Object);
|
||||
** executeOnPooledThread(java.lang.Runnable);
|
||||
** getUserData(java.lang.String);
|
||||
int getBooleanAttributes(java.io.File);
|
||||
<init>(kotlinc.internal.com.intellij.lang.ASTNode);
|
||||
-keep class org.jetbrains.annotations.** {
|
||||
public protected *;
|
||||
}
|
||||
|
||||
# Keep the special static methods that are required in enumeration classes.
|
||||
-keep class org.jetbrains.k2js.** {
|
||||
public protected *;
|
||||
}
|
||||
|
||||
-keep class org.jetbrains.jet.** {
|
||||
public protected *;
|
||||
}
|
||||
|
||||
-keep class jet.** {
|
||||
public protected *;
|
||||
}
|
||||
|
||||
-keepclasseswithmembers class * { void start(); }
|
||||
|
||||
-keepclasseswithmembers class * { void stop(); }
|
||||
-keepclasseswithmembers class * { void dispose(); }
|
||||
|
||||
-keepclasseswithmembers class * { ** getFileSystem(); }
|
||||
-keepclasseswithmembers class * { ** isVarArgs(); }
|
||||
-keepclasseswithmembers class * { ** getApplication(); }
|
||||
-keepclasseswithmembers class * { ** finalizeReferent(); }
|
||||
-keepclasseswithmembers class * { ** newBuilder(); }
|
||||
-keepclasseswithmembers class * { ** startFinalizer(java.lang.Class,java.lang.Object); }
|
||||
-keepclasseswithmembers class * { ** executeOnPooledThread(java.lang.Runnable); }
|
||||
-keepclasseswithmembers class * { ** getUserData(java.lang.String); }
|
||||
-keepclasseswithmembers class * { int getBooleanAttributes(java.io.File); }
|
||||
|
||||
-keepclasseswithmembers class * { ** project(); }
|
||||
|
||||
-keepclasseswithmembers class * { ** TYPE; }
|
||||
-keepclasseswithmembers class * { ** ourInstance; }
|
||||
|
||||
-keepclasseswithmembers class * { <init>(kotlinc.internal.com.intellij.lang.ASTNode); }
|
||||
|
||||
-keepclassmembers enum * {
|
||||
public static **[] values();
|
||||
public static ** valueOf(java.lang.String);
|
||||
@@ -291,52 +227,111 @@
|
||||
-keepclassmembers class * {
|
||||
** toString();
|
||||
** hashCode();
|
||||
** project();
|
||||
|
||||
** TYPE;
|
||||
** ourInstance;
|
||||
}
|
||||
]]></proguard>
|
||||
<delete file="${output}/kotlin-compiler-clean.jar" />
|
||||
<!--<delete file="${output}/kotlin-compiler-before-proguard.jar"/>-->
|
||||
</target>
|
||||
|
||||
<target name="nojarjar" unless="nojarjar">
|
||||
<jar destfile="${output}/kotlin-compiler.jar">
|
||||
<fileset dir="${output}/classes/compiler"/>
|
||||
<fileset dir="${output}/classes/runtime"/>
|
||||
<fileset dir="${basedir}/compiler/frontend/src" includes="jet/**"/>
|
||||
<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"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="clean">
|
||||
<delete dir="${output}"/>
|
||||
<target name="jdkHeaders">
|
||||
<cleandir dir="${output}/classes/stdlib"/>
|
||||
|
||||
<java classname="org.jetbrains.jet.cli.jvm.K2JVMCompiler" failonerror="true">
|
||||
<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="-mode"/>
|
||||
<arg value="jdkHeaders"/>
|
||||
</java>
|
||||
|
||||
<jar destfile="${kotlin-home}/lib/alt/kotlin-jdk-headers.jar">
|
||||
<fileset dir="${output}/classes/jdk-headers"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="copyKotlinJars">
|
||||
<copy todir="${kotlin-home}/lib">
|
||||
<fileset dir="${idea.sdk}/core" includes="*.jar"/>
|
||||
<fileset dir="${basedir}/lib" includes="**/*.jar"/>
|
||||
</copy>
|
||||
<copy todir="${kotlin-home}/lib/js">
|
||||
<fileset dir="${basedir}/js/js.translator/lib" includes="**/*.jar"/>
|
||||
</copy>
|
||||
<copy todir="${kotlin-home}/bin">
|
||||
<fileset dir="${basedir}/compiler/cli/bin"/>
|
||||
</copy>
|
||||
<chmod dir="${kotlin-home}/bin" includes="*" perm="755"/>
|
||||
<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="-mode"/>
|
||||
<arg value="stdlib"/>
|
||||
<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/**/*"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<target name="dist" depends="init,copyKotlinJars,jar,buildToolsJar,jarJDKHeaders,jarRT,jarLang,jarjar,nojarjar"/>
|
||||
<target name="lang">
|
||||
<cleandir dir="${output}/classes/lang"/>
|
||||
<java classname="org.jetbrains.jet.cli.jvm.K2JVMCompiler" failonerror="true">
|
||||
<classpath>
|
||||
<pathelement location="${kotlin-home}/lib/kotlin-compiler.jar"/>
|
||||
</classpath>
|
||||
<arg value="-src"/>
|
||||
<arg value="${basedir}/compiler/frontend/src"/>
|
||||
<arg value="-output"/>
|
||||
<arg value="${output}/classes/lang"/>
|
||||
<arg value="-mode"/>
|
||||
<arg value="builtins"/>
|
||||
</java>
|
||||
|
||||
<target name="doc" depends="dist"/>
|
||||
<!-- Not used yet -->
|
||||
<!--
|
||||
<jar destfile="${kotlin-home}/lib/lang.jar">
|
||||
<fileset dir="${output}/classes/lang"/>
|
||||
</jar>
|
||||
-->
|
||||
</target>
|
||||
|
||||
<target name="dist"
|
||||
depends="init,prepareDist,injectorsGenerator,generateInjectors,compiler,antTools,jdkHeaders,runtime,lang"/>
|
||||
|
||||
<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"/>
|
||||
</zip>
|
||||
</target>
|
||||
</project>
|
||||
|
||||
Reference in New Issue
Block a user