summaryrefslogtreecommitdiff
path: root/build/update.xml
blob: e06cfce3ee93819cddf290e2aa80888f86afea40 (plain)
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
<!--
  ~ Copyright 2000-2010 JetBrains s.r.o.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<project name="IntelliJ IDEA CE build file" default="layout">
  <dirname property="build" file="${ant.file}"/>
  <property name="project.home" value="${build}/../"/>
  <property name="gant.home" value="${project.home}/build/lib/gant"/>
  <property name="modules.output" value="${project.home}/out"/>

  <macrodef name="run">
    <attribute name="script"/>
    <attribute name="target" default="default"/>
    <attribute name="deploy"/>

    <sequential>
      <java failonerror="true" classname="org.apache.tools.ant.Main" fork="true">
        <jvmarg line="-Xms64m -Xmx512m"/>
        <jvmarg line="&quot;-Ddeploy=@{deploy}&quot;"/>
        <jvmarg line="&quot;-Dmodules.output=${modules.output}&quot;"/>
        <jvmarg line="&quot;-Dgant.script=@{script}&quot;"/>
        <jvmarg line="&quot;-Dgant.target=@{target}&quot;"/>

        <classpath>
          <fileset dir="${project.home}/lib/ant/lib">
            <include name="*.jar"/>
          </fileset>
        </classpath>

        <arg value="-f"/>
        <arg value="gant.xml"/>
      </java>

      <java classname="com.intellij.util.io.zip.ReorderJarsMain" fork="true">
        <jvmarg line="-Djava.awt.headless=true"/>
        <arg value="${build}/order.txt"/>
        <arg value="@{deploy}"/>
        <arg value="@{deploy}"/>
        <arg value="${project.home}/lib"/>
        <classpath>
          <pathelement location="${modules.output}/production/util-rt"/>
          <pathelement location="${modules.output}/production/util"/>
          <pathelement location="${project.home}/lib/jna.jar"/>
          <pathelement location="${project.home}/lib/trove4j.jar"/>
        </classpath>
      </java>
    </sequential>
  </macrodef>

  <target name="layout">
    <run script="${project.home}/build/scripts/layouts.gant"
         deploy="${project.home}/out/deploy"/>
  </target>

  <target name="build-jars">
    <run script="${project.home}/build/scripts/dist.gant"
         target="build-dist-jars"
         deploy="${project.home}/out/deploy"/>
  </target>
</project>