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