allow running CE tests with 'ant test'
[idea/community.git] / build.xml
1 <project name="IntelliJ IDEA Community Edition" default="all">
2   <property name="project.home" value="${basedir}"/>
3   <property name="out.dir" value="${project.home}/out"/>
4   <property name="tmp.dir" value="${project.home}/out/tmp"/>
5   <property name="gant.home" value="${project.home}/build/lib/gant"/>
6
7   <target name="cleanup">
8     <delete dir="${out.dir}" failonerror="false"/>
9   </target>
10
11   <target name="init">
12     <mkdir dir="${out.dir}"/>
13     <mkdir dir="${tmp.dir}"/>
14   </target>
15
16   <macrodef name="call_gant">
17     <attribute name="script" />
18     <sequential>
19       <java failonerror="true" classname="org.apache.tools.ant.Main" fork="true">
20         <jvmarg line="-Xms64m -Xmx512m"/>
21         <jvmarg line="&quot;-Dgant.script=@{script}&quot;"/>
22         <jvmarg line="&quot;-Dteamcity.build.tempDir=${tmp.dir}&quot;"/>
23         <jvmarg line="&quot;-Didea.test.group=ALL_EXCLUDE_DEFINED&quot;"/>
24
25         <classpath>
26           <fileset dir="${project.home}/lib/ant/lib">
27             <include name="*.jar"/>
28           </fileset>
29           <fileset dir="${gant.home}/lib">
30             <include name="*.jar"/>
31           </fileset>
32         </classpath>
33
34         <arg value="-f"/>
35         <arg value="${project.home}/build/gant.xml"/>
36       </java>
37     </sequential>
38   </macrodef>
39
40   <target name="build" depends="init">
41     <call_gant script="${project.home}/build/scripts/dist.gant"/>
42   </target>
43
44   <target name="test" depends="init">
45     <call_gant script="${project.home}/build/scripts/tests.gant"/>
46   </target>
47
48   <target name="all" depends="cleanup,build"/>
49 </project>