forked from BasLeijdekkers/TabSwitch
-
Notifications
You must be signed in to change notification settings - Fork 8
/
build.xml
76 lines (65 loc) · 2.8 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
<project default="jar" name="TabSwitch">
<property name="idea.home" value="/Applications/IntelliJ IDEA 13.app"/>
<property name="idea.plugin.home" value="${user.home}/Library/Application Support/IntelliJIdea13"/>
<property name="build.dir" value="build"/>
<property name="build.classes.dir" value="${build.dir}/classes"/>
<property name="build.jars.dir" value="${build.dir}/jars"/>
<property name="src.dir" value="src"/>
<property name="jar.file" value="${ant.project.name}.jar"/>
<path id="project.classpath">
<pathelement path="${idea.home}/lib/openapi.jar"/>
<pathelement path="${idea.home}/lib/util.jar"/>
<pathelement path="${idea.home}/lib/idea.jar"/>
<pathelement path="${idea.home}/lib/extensions.jar"/>
<pathelement path="${idea.home}/lib/jdom.jar"/>
<pathelement path="${idea.home}/redist/annotations.jar"/>
</path>
<target name="clean">
<delete dir="${build.dir}"/>
</target>
<path id="javac2.classpath">
<fileset dir="${idea.home}/lib/">
<include name="javac2.jar"/>
<include name="asm.jar"/>
<include name="asm4-all.jar"/>
<include name="asm-commons.jar"/>
</fileset>
</path>
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<target name="compile">
<mkdir dir="${build.classes.dir}"/>
<javac2 srcdir="${src.dir}" destdir="${build.classes.dir}" debug="true" deprecation="true"
includeantruntime="true">
<classpath refid="project.classpath"/>
</javac2>
</target>
<target name="jar" depends="compile" description="prepare plugin for deployment">
<mkdir dir="${build.jars.dir}"/>
<delete file="${build.jars.dir}/${jar.file}"/>
<jar jarfile="${build.jars.dir}/${jar.file}">
<fileset dir="${build.classes.dir}"/>
<fileset dir=".">
<include name="META-INF/plugin.xml"/>
</fileset>
</jar>
</target>
<target name="deploy" depends="jar" description="deploys the plugin to the default plugin dir">
<copy file="${build.jars.dir}/${ant.project.name}.jar"
todir="${idea.plugin.home}/${ant.project.name}/lib"/>
<copy file="lib/errorReporter.jar"
todir="${idea.plugin.home}/${ant.project.name}/lib"/>
</target>
<target name="zip" depends="jar" description="creates plugin zip for distribution">
<zip destfile="./${ant.project.name}.zip">
<zipfileset file="${build.jars.dir}/${ant.project.name}.jar" prefix="${ant.project.name}/lib"/>
<zipfileset file="lib/errorReporter.jar" prefix="${ant.project.name}/lib"/>
</zip>
</target>
<target name="src" description="zips up all sources for distribution">
<zip destfile="${ant.project.name}_src.zip"
basedir="."
includes="src/** META-INF/** build.xml lib/** *.ipr *.iml"
excludes="CVS/**"
/>
</target>
</project>