forked from JetBrains/intellij-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
93 lines (80 loc) · 3.45 KB
/
build.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!--
This build script compiles IntelliJ IDEA. Options include:
-Dout=/path/to/out/dir, defaults to ${basedir}/out
-Dbuild=123, defaults to SNAPSHOT
-Dtestpatterns=com.foo.*, defaults to empty string
-Dproduct=foo, defaults to idea
-->
<project name="IntelliJ IDEA Community Edition" default="all">
<property name="project.home" value="${basedir}"/>
<condition property="out.dir" value="${out}" else="${project.home}/out">
<isset property="out" />
</condition>
<condition property="build.number" value="${build}" else="SNAPSHOT">
<isset property="build" />
</condition>
<condition property="test.patterns" value="${testpatterns}" else="">
<isset property="testpatterns" />
</condition>
<condition property="product.name" value="${product}" else="idea">
<isset property="product" />
</condition>
<condition property="productPropertiesPath" value="${productPropertiesPath}" else="">
<isset property="productPropertiesPath" />
</condition>
<property name="tmp.dir" value="${out.dir}/tmp"/>
<target name="cleanup">
<delete dir="${out.dir}" failonerror="false"/>
</target>
<target name="init">
<mkdir dir="${out.dir}"/>
<mkdir dir="${tmp.dir}"/>
<java classname="org.apache.tools.ant.Main" fork="true" failonerror="true" dir="${project.home}">
<sysproperty key="gant.script" value="${project.home}/build/scripts/download_kotlin.gant"/>
<classpath>
<fileset dir="${project.home}/lib/ant/lib">
<include name="*.jar"/>
</fileset>
</classpath>
<arg value="-f"/>
<arg value="${project.home}/build/gant.xml"/>
</java>
</target>
<macrodef name="call_gant">
<attribute name="script" />
<sequential>
<java failonerror="true" jar="${project.home}/lib/ant/lib/ant-launcher.jar" fork="true">
<jvmarg line="-Xmx812m -XX:MaxPermSize=152m"/>
<sysproperty key="jna.nosys" value="true" />
<sysproperty key="out" value="${out.dir}" />
<sysproperty key="buildNumber" value="${build.number}" />
<sysproperty key="idea.test.patterns" value="${test.patterns}" />
<sysproperty key="product" value="${product.name}" />
<jvmarg value="-DproductPropertiesPath=${productPropertiesPath}" />
<sysproperty key="java.awt.headless" value="true"/>
<sysproperty key="gant.script" value="@{script}"/>
<sysproperty key="teamcity.build.tempDir" value="${tmp.dir}"/>
<sysproperty key="idea.test.group" value="ALL_EXCLUDE_DEFINED"/>
<arg value="-f"/>
<arg value="${project.home}/build/gant.xml"/>
</java>
</sequential>
</macrodef>
<target name="build" depends="init">
<call_gant script="${project.home}/build/scripts/dist.gant"/>
</target>
<target name="test" depends="init">
<call_gant script="${project.home}/build/scripts/tests.gant"/>
</target>
<!-- The build task creates an updater.jar in ${out.dir}. This task bundles the updater and its dependencies into a single jar -->
<taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${project.home}/build/lib/jarjar-1.0.jar"/>
<target name="fullupdater" depends="build">
<jarjar jarfile="${out.dir}/updater-full.jar">
<zipfileset src="${out.dir}/updater.jar" />
<zipfileset src="lib/log4j.jar" />
<zipfileset src="lib/jna.jar" />
<zipfileset src="lib/jna-utils.jar" />
</jarjar>
</target>
<target name="all" depends="cleanup,build"/>
</project>