pack compiler into one jar (without js yet)
This commit is contained in:
+1
-1
@@ -11,7 +11,7 @@ patches-master
|
|||||||
out
|
out
|
||||||
dist
|
dist
|
||||||
ideaSDK
|
ideaSDK
|
||||||
PluginVerifier
|
dependencies
|
||||||
.idea/dictionaries/yozh.xml
|
.idea/dictionaries/yozh.xml
|
||||||
.idea/workspace.xml
|
.idea/workspace.xml
|
||||||
tmp
|
tmp
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@
|
|||||||
<property name="compiler.version.java.bk" value="${compiler.version.java}.bk"/>
|
<property name="compiler.version.java.bk" value="${compiler.version.java}.bk"/>
|
||||||
<property name="compiler.version.java.versioned" value="${compiler.version.java}.versioned" />
|
<property name="compiler.version.java.versioned" value="${compiler.version.java}.versioned" />
|
||||||
|
|
||||||
<property name="plugin.verifier" value="${basedir}/PluginVerifier/plugin-verifier-1.0-SNAPSHOT.jar"/>
|
<property name="plugin.verifier" value="${basedir}/dependencies/plugin-verifier.jar"/>
|
||||||
<property name="plugin.zip" value="${artifact.output.path}/kotlin-plugin-${build.number}.zip" />
|
<property name="plugin.zip" value="${artifact.output.path}/kotlin-plugin-${build.number}.zip" />
|
||||||
|
|
||||||
<macrodef name="echoprop">
|
<macrodef name="echoprop">
|
||||||
|
|||||||
@@ -166,9 +166,12 @@
|
|||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="jarjar">
|
<target name="jarjar">
|
||||||
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${basedir}/build/jarjar-1.2.jar"/>
|
<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 jarfile="${output}/kotlin-compiler-tmp.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/compiler"/>
|
||||||
<fileset dir="${output}/classes/runtime"/>
|
<fileset dir="${output}/classes/runtime"/>
|
||||||
<fileset dir="${basedir}/compiler/frontend/src" includes="jet/**"/>
|
<fileset dir="${basedir}/compiler/frontend/src" includes="jet/**"/>
|
||||||
@@ -176,6 +179,19 @@
|
|||||||
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
|
<zipgroupfileset dir="${basedir}/lib" includes="*.jar"/>
|
||||||
<zipgroupfileset dir="${basedir}/ideaSDK/core" includes="*.jar"/>
|
<zipgroupfileset dir="${basedir}/ideaSDK/core" includes="*.jar"/>
|
||||||
|
|
||||||
|
<zap pattern="com.thoughtworks.xstream.converters.extended.ISO8601*"/>
|
||||||
|
<zap pattern="com.thoughtworks.xstream.converters.reflection.CGLIBEnhancedConverter*"/>
|
||||||
|
<zap pattern="com.thoughtworks.xstream.io.xml.Dom4J*"/>
|
||||||
|
<zap pattern="com.thoughtworks.xstream.io.xml.Xom*"/>
|
||||||
|
<zap pattern="com.thoughtworks.xstream.mapper.CGLIBMapper*"/>
|
||||||
|
|
||||||
|
<zap pattern="org.apache.log4j.jmx.Agent"/>
|
||||||
|
<zap pattern="org.apache.log4j.net.JMS*"/>
|
||||||
|
<zap pattern="org.apache.log4j.net.SMTP*"/>
|
||||||
|
<zap pattern="org.apache.log4j.or.jms.MessageRenderer"/>
|
||||||
|
|
||||||
|
<zap pattern="org.jdom.xpath.Jaxen*"/>
|
||||||
|
|
||||||
<rule pattern="com.intellij.**" result="kotlinc.internal.com.intellij.@1"/>
|
<rule pattern="com.intellij.**" result="kotlinc.internal.com.intellij.@1"/>
|
||||||
<rule pattern="org.intellij.lang.annotations.**" result="kotlinc.internal.org.intellij.lang.annotations.@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="org.jetbrains.annotations.**" result="kotlinc.internal.org.jetbrains.annotations.@1"/>
|
||||||
@@ -189,11 +205,13 @@
|
|||||||
|
|
||||||
<delete failonerror="false" dir="${output}/kotlin-compiler.exploded"/>
|
<delete failonerror="false" dir="${output}/kotlin-compiler.exploded"/>
|
||||||
<mkdir dir="${output}/kotlin-compiler.exploded"/>
|
<mkdir dir="${output}/kotlin-compiler.exploded"/>
|
||||||
|
<unzip src="${output}/kotlin-compiler-jarjar.jar" dest="${output}/kotlin-compiler.exploded"/>
|
||||||
|
|
||||||
<unzip src="${output}/kotlin-compiler-tmp.jar" dest="${output}/kotlin-compiler.exploded"/>
|
<delete file="${output}/kotlin-compiler-jarjar.jar"/>
|
||||||
<delete file="${output}/kotlin-compiler-tmp.jar"/>
|
|
||||||
|
|
||||||
<jar jarfile="${output}/kotlin-compiler-standalone.jar">
|
<!-- Clean JarJar result -->
|
||||||
|
<delete file="${output}/kotlin-compiler-clean.jar" failonerror="false"/>
|
||||||
|
<jar jarfile="${output}/kotlin-compiler-clean.jar">
|
||||||
<fileset dir="${output}/kotlin-compiler.exploded">
|
<fileset dir="${output}/kotlin-compiler.exploded">
|
||||||
<include name="**/*.class"/>
|
<include name="**/*.class"/>
|
||||||
<include name="**/*.jet"/>
|
<include name="**/*.jet"/>
|
||||||
@@ -213,8 +231,57 @@
|
|||||||
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
|
<attribute name="Main-Class" value="org.jetbrains.jet.cli.jvm.K2JVMCompiler"/>
|
||||||
</manifest>
|
</manifest>
|
||||||
</jar>
|
</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}/lib/classes.jar" file="${java.home}/lib/classes.jar" />
|
||||||
|
|
||||||
|
<delete file="${output}/kotlin-compiler.jar" failonerror="false"/>
|
||||||
|
<proguard><![CDATA[
|
||||||
|
-injars '${output}/kotlin-compiler-clean.jar'
|
||||||
|
-outjars '${output}/kotlin-compiler.jar'
|
||||||
|
|
||||||
|
-libraryjars '${rtjar}'
|
||||||
|
|
||||||
|
-target 1.6
|
||||||
|
-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();
|
||||||
|
** executeOnPooledThread(java.lang.Runnable);
|
||||||
|
int getBooleanAttributes(java.io.File);
|
||||||
|
<init>(kotlinc.internal.com.intellij.lang.ASTNode);
|
||||||
|
}
|
||||||
|
|
||||||
|
# Keep the special static methods that are required in enumeration classes.
|
||||||
|
-keepclassmembers enum * {
|
||||||
|
public static **[] values();
|
||||||
|
public static ** valueOf(java.lang.String);
|
||||||
|
}
|
||||||
|
|
||||||
|
-keepclassmembers class * {
|
||||||
|
** toString();
|
||||||
|
** hashCode();
|
||||||
|
** project();
|
||||||
|
|
||||||
|
** TYPE;
|
||||||
|
** ourInstance;
|
||||||
|
}
|
||||||
|
]]></proguard>
|
||||||
|
<delete file="${output}/kotlin-compiler-clean.jar" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="clean">
|
<target name="clean">
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+37
-9
@@ -1,24 +1,44 @@
|
|||||||
<project name="Update Dependencies" default="update">
|
<project name="Update Dependencies" default="update">
|
||||||
<property name="build.zip" value="ideaIC-117.SNAPSHOT.win.zip"/>
|
<property name="build.zip" value="ideaIC-117.SNAPSHOT.win.zip"/>
|
||||||
|
|
||||||
<target name="update">
|
<target name="update" depends="fetch-third-party">
|
||||||
<execute_update/>
|
<execute_update/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="jb_update">
|
<target name="jb_update" depends="fetch-third-party">
|
||||||
<execute_update teamcity="http://buildserver.labs.intellij.net" teamcity.build="bt2560"/>
|
<execute_update teamcity="http://buildserver.labs.intellij.net" teamcity.build="bt2560"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
<target name="fetch-third-party">
|
||||||
|
<mkdir dir="dependencies" />
|
||||||
|
<mkdir dir="dependencies/download" />
|
||||||
|
|
||||||
|
<!-- ProGuard -->
|
||||||
|
<get src="http://heanet.dl.sourceforge.net/project/proguard/proguard%20beta/4.8beta/proguard4.8beta1.zip" dest="dependencies/download/" usetimestamp="true"/>
|
||||||
|
|
||||||
|
<delete file="dependencies/proguard.jar" failonerror="false"/>
|
||||||
|
<unzip src="dependencies/download/proguard4.8beta1.zip" dest="dependencies">
|
||||||
|
<patternset>
|
||||||
|
<include name="proguard4.8beta1/lib/proguard.jar"/>
|
||||||
|
</patternset>
|
||||||
|
<mapper type="flatten"/>
|
||||||
|
</unzip>
|
||||||
|
|
||||||
|
<!-- JarJar -->
|
||||||
|
<get src="http://jarjar.googlecode.com/files/jarjar-1.2.jar" dest="dependencies/download/" usetimestamp="true"/>
|
||||||
|
<copy file="dependencies/download/jarjar-1.2.jar" tofile="dependencies/jarjar.jar" overwrite="true" />
|
||||||
|
|
||||||
|
<!-- PluginVerifier -->
|
||||||
|
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/bt351/.lastPinned/plugin-verifier-1.0-SNAPSHOT.jar"
|
||||||
|
dest="dependencies/download/"/>
|
||||||
|
<copy file="dependencies/download/plugin-verifier-1.0-SNAPSHOT.jar" tofile="dependencies/plugin-verifier.jar" overwrite="true" />
|
||||||
|
</target>
|
||||||
|
|
||||||
<macrodef name="execute_update">
|
<macrodef name="execute_update">
|
||||||
<attribute name="teamcity" default="http://teamcity.jetbrains.com"/>
|
<attribute name="teamcity" default="http://teamcity.jetbrains.com"/>
|
||||||
<attribute name="teamcity.build" default="bt365"/> <!-- IDEA CE 11.1 branch 117 -->
|
<attribute name="teamcity.build" default="bt365"/>
|
||||||
|
<!-- IDEA CE 11.1 branch 117 -->
|
||||||
<sequential>
|
<sequential>
|
||||||
<delete dir="PluginVerifier" failonerror="false" />
|
|
||||||
<delete file="PluginVerifier" failonerror="false" />
|
|
||||||
<mkdir dir="PluginVerifier" />
|
|
||||||
|
|
||||||
<get src="http://teamcity.jetbrains.com/guestAuth/repository/download/bt351/.lastPinned/plugin-verifier-1.0-SNAPSHOT.jar" dest="PluginVerifier"/>
|
|
||||||
|
|
||||||
<property name="core" value="ideaSDK/core"/>
|
<property name="core" value="ideaSDK/core"/>
|
||||||
<property name="tc" value="@{teamcity}/guestAuth/repository/download/@{teamcity.build}/.lastSuccessful"/>
|
<property name="tc" value="@{teamcity}/guestAuth/repository/download/@{teamcity.build}/.lastSuccessful"/>
|
||||||
|
|
||||||
@@ -40,8 +60,16 @@
|
|||||||
<unzip src="ideaSDK/${build.zip}" dest="ideaSDK"/>
|
<unzip src="ideaSDK/${build.zip}" dest="ideaSDK"/>
|
||||||
<delete file="ideaSDK/${build.zip}"/>
|
<delete file="ideaSDK/${build.zip}"/>
|
||||||
|
|
||||||
|
<copy file="ideaSDK/lib/jdom.jar" todir="${core}"/>
|
||||||
|
<copy file="ideaSDK/lib/jna.jar" todir="${core}"/>
|
||||||
|
<copy file="ideaSDK/lib/log4j.jar" todir="${core}"/>
|
||||||
|
<copy file="ideaSDK/lib/xstream.jar" todir="${core}"/>
|
||||||
|
<copy file="ideaSDK/lib/xpp3-1.1.4-min.jar" todir="${core}"/>
|
||||||
|
<!--<copy file="lib/jsr305-1.3.9.jar" todir="${core}"/>-->
|
||||||
|
|
||||||
<!-- TODO temporary workaround since util-rt is not packaged into intellij-core.jar -->
|
<!-- TODO temporary workaround since util-rt is not packaged into intellij-core.jar -->
|
||||||
<copy file="ideaSDK/lib/util.jar" todir="${core}"/>
|
<copy file="ideaSDK/lib/util.jar" todir="${core}"/>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
This one needs to be deleted because otherwise it gets onto the classpath
|
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
|
together with junit-4.10.jar and the classloading goes crazy that breaks
|
||||||
|
|||||||
Reference in New Issue
Block a user