-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
115 lines (98 loc) · 4.39 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<!--
~ Copyright 2010 Guy Mahieu
~
~ 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="IvyIDEA" default="bundle" basedir=".">
<property name="ivyidea.version" value="1.0.12"/>
<property name="ivyidea.sourcedir" value="src/main/java"/>
<property name="ivyidea.resourcedir" value="src/main/resources"/>
<property name="ivyidea.builddir" value="build/classes"/>
<property name="ivyidea.libdir" value="lib"/>
<property environment="env" />
<property name="idea.home" value="${env.IDEA_HOME}" />
<fail message="Environment variable IDEA_HOME was not set!">
<condition>
<equals arg1="${idea.home}" arg2="$${env.IDEA_HOME}" />
</condition>
</fail>
<taskdef name="javac2" classname="com.intellij.ant.Javac2">
<classpath>
<pathelement location="${idea.home}/redist/javac2.jar" />
<pathelement location="${idea.home}/lib/asm.jar" />
<pathelement location="${idea.home}/lib/asm-commons.jar" />
<pathelement location="${idea.home}/lib/asm4-all.jar" />
<pathelement location="${idea.home}/lib/jdom.jar" />
<pathelement location="${idea.home}/lib/jgoodies-forms.jar" />
</classpath>
</taskdef>
<target name="clean">
<delete dir="build" />
</target>
<target name="jar">
<mkdir dir="build" />
<mkdir dir="${ivyidea.builddir}" />
<javac2 srcdir="${ivyidea.sourcedir}"
destdir="${ivyidea.builddir}"
source="1.6"
target="1.6"
includeantruntime="false"
debug="true">
<classpath>
<!-- intelliJ API -->
<pathelement location="${idea.home}/lib/annotations.jar" />
<pathelement location="${idea.home}/lib/extensions.jar" />
<pathelement location="${idea.home}/lib/forms_rt.jar" />
<pathelement location="${idea.home}/lib/jdom.jar" />
<pathelement location="${idea.home}/lib/openapi.jar" />
<pathelement location="${idea.home}/lib/util.jar" />
<pathelement location="${idea.home}/lib/idea.jar" />
<!-- Ivy -->
<pathelement location="${ivyidea.libdir}/ivy-2.4.0.jar" />
</classpath>
</javac2>
<jar file="build/ivyidea-${ivyidea.version}.jar">
<fileset dir="${ivyidea.builddir}">
<include name="**/*"/>
</fileset>
<fileset dir="${ivyidea.sourcedir}">
<include name="/META-INF/**/*"/>
</fileset>
<fileset dir="${ivyidea.resourcedir}"/>
</jar>
</target>
<target name="bundle" depends="jar">
<delete dir="build/dist/tmp"/>
<mkdir dir="build/dist/tmp/IvyIDEA/lib"/>
<copy todir="build/dist/tmp/IvyIDEA/lib">
<!-- Ivy -->
<fileset file="${ivyidea.libdir}/ivy-2.4.0.jar"/>
<!--Third party Ivy runtime dependencies-->
<fileset file="${ivyidea.libdir}/jsch-0.1.31.jar"/>
<fileset file="${ivyidea.libdir}/oro-2.0.8.jar"/>
<fileset file="${ivyidea.libdir}/commons-vfs-1.0.jar"/>
<!-- IvyIDEA -->
<fileset dir="build" includes="ivyidea-${ivyidea.version}.jar"/>
</copy>
<mkdir dir="build/dist/tmp/IvyIDEA/license"/>
<copy todir="build/dist/tmp/IvyIDEA/license">
<fileset dir="src/main/license" includes="**/*"/>
</copy>
<zip file="build/dist/IvyIDEA-${ivyidea.version}.zip">
<fileset dir="build/dist/tmp">
<include name="IvyIDEA/**"/>
</fileset>
</zip>
<delete dir="build/dist/tmp"/>
</target>
</project>