forked from JetBrains/intellij-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
65 lines (59 loc) · 2.97 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
<!--
This build script compiles, build distribution archives and run tests in IntelliJ IDEA Community Edition. Build process can be customized
via options, see org.jetbrains.intellij.build.BuildOptions and org.jetbrains.intellij.build.TestingOptions classes for details. System properties
from these classes can be passed as Ant properties in the command line, e.g. run 'ant -Dintellij.build.output.root=/path/to/dir' to
specify custom output directory.
Note that this script is for building IntelliJ IDEA Community Edition only. If you want to build your own product based on IntelliJ Platform,
create a gant script for it, see javadoc for org.jetbrains.intellij.build for details.
-->
<project name="IntelliJ IDEA Community Edition" default="build">
<property name="project.home" value="${basedir}"/>
<target name="init">
<condition property="gradle.executable" value="${project.home}/build/dependencies/gradlew.bat"
else="${project.home}/build/dependencies/gradlew">
<os family="windows"/>
</condition>
<exec executable="${gradle.executable}" dir="${project.home}/build/dependencies" failonerror="true">
<env key="JAVA_HOME" value="${java.home}"/>
<arg value="--no-daemon"/>
<arg value="setupKotlinPlugin"/>
</exec>
<propertyset id="intellij.build.properties">
<propertyref name="build.number"/>
<propertyref prefix="intellij.build."/>
</propertyset>
</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="java.awt.headless" value="true"/>
<sysproperty key="gant.script" value="@{script}"/>
<syspropertyset refid="intellij.build.properties"/>
<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/idea_community.gant"/>
</target>
<target name="test" depends="init">
<call_gant script="${project.home}/build/scripts/tests_in_community.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">
<condition property="out.dir" value="${intellij.build.output.root}" else="${project.home}/out">
<isset property="intellij.build.output.root"/>
</condition>
<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>
</project>