hidpi: use JBUI.scale
[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}"
20              else="org.jetbrains.android.*;com.android.tools.idea.*;com.google.gct.*;com.intellij.android.*">
21     <isset property="testpatterns" />
22   </condition>
23
24   <condition property="product.name" value="${product}" else="idea">
25     <isset property="product" />
26   </condition>
27
28   <property name="tmp.dir" value="${out.dir}/tmp"/>
29
30   <target name="cleanup">
31     <delete dir="${out.dir}" failonerror="false"/>
32   </target>
33
34   <target name="init">
35     <mkdir dir="${out.dir}"/>
36     <mkdir dir="${tmp.dir}"/>
37     <ant dir="build" antfile="download_kotlin.xml"/>
38   </target>
39
40   <macrodef name="call_gant">
41     <attribute name="script" />
42     <sequential>
43       <java failonerror="true" jar="${project.home}/lib/ant/lib/ant-launcher.jar" fork="true">
44         <jvmarg line="-Xmx612m -XX:MaxPermSize=152m"/>
45         <jvmarg value="-Djna.nosys=true" />
46         <jvmarg value="-Dout=${out.dir}" />
47         <jvmarg value="-DbuildNumber=${build.number}" />
48         <jvmarg value="-Didea.test.patterns=${test.patterns}" />
49         <jvmarg value="-Dproduct=${product.name}" />
50         <sysproperty key="java.awt.headless" value="true"/>
51         <arg line="&quot;-Dgant.script=@{script}&quot;"/>
52         <arg line="&quot;-Dteamcity.build.tempDir=${tmp.dir}&quot;"/>
53         <arg line="&quot;-Didea.test.group=ALL_EXCLUDE_DEFINED&quot;"/>
54         <arg value="-f"/>
55         <arg value="${project.home}/build/gant.xml"/>
56       </java>
57     </sequential>
58   </macrodef>
59
60   <target name="build" depends="init">
61     <call_gant script="${project.home}/build/scripts/dist.gant"/>
62   </target>
63
64   <target name="test" depends="init">
65     <call_gant script="${project.home}/build/scripts/tests.gant"/>
66   </target>
67
68   <!-- The build task creates an updater.jar in ${out.dir}. This task bundles the updater and its dependencies into a single jar -->
69   <taskdef name="jarjar" classname="com.tonicsystems.jarjar.JarJarTask" classpath="${project.home}/build/lib/jarjar-1.0.jar"/>
70   <target name="fullupdater" depends="build">
71     <jarjar jarfile="${out.dir}/updater-full.jar">
72       <zipfileset src="${out.dir}/updater.jar" />
73       <zipfileset src="lib/log4j.jar" />
74       <zipfileset src="lib/jna.jar" />
75       <zipfileset src="lib/jna-utils.jar" />
76     </jarjar>
77   </target>
78
79   <target name="all" depends="cleanup,build"/>
80 </project>