forked from HaxeFoundation/intellij-haxe
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
128 lines (109 loc) · 5.42 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
116
117
118
119
120
121
122
123
124
125
126
127
<project name="Idea Haxe language scripted package plugin" default="package" basedir=".">
<description>
Run "ant -f common.xml -projecthelp" for more complete project help.
</description>
<import file="common.xml"/>
<!-- javac2 is an intellij ant task to wrap the java compiler and add
support to .form files and @NotNull annotations, among others -->
<property name="javac2.home" value="${idea.ultimate.build}/lib"/>
<path id="javac2.classpath">
<pathelement location="${javac2.home}/javac2.jar"/>
<pathelement location="${javac2.home}/jdom.jar"/>
<pathelement location="${javac2.home}/asm-all.jar"/>
<pathelement location="${javac2.home}/jgoodies-forms.jar"/>
</path>
<taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
<taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions" classpathref="javac2.classpath"/>
<!-- Put the subsystems in separate directories to deal with dependency issues.
Basically, jps-plugin can't be compiled into the same directory structure as
the rest of the plugin code. -->
<property name="build.output.directory" value="build"/>
<property name="jps.build.output.directory" value="${build.output.directory}/jps-plugin"/>
<property name="plugin.build.output.directory" value="${build.output.directory}/haxe"/>
<property name="common.build.output.directory" value="${build.output.directory}/common"/>
<target name="clean" description="Erase all build artifacts">
<delete dir="${build.output.directory}" />
</target>
<target name="init" depends="showIdeaBuild">
<echo level="warning">
Using IDEA release at: ${idea.ultimate.build}
</echo>
<tstamp/>
<mkdir dir="${build.output.directory}"/>
</target>
<target name="compile" depends="clean,init,generateTemplatedFiles,compile.common,compile.jps,compile.plugin" description="Compile Haxe Plugin Cleanly">
</target>
<target name="compile.jps" depends="compile.common" description="Compile JPS Runtime Support Incrementally">
<mkdir dir="${jps.build.output.directory}"/>
<property name="compiler.max.memory" value="700m"/>
<javac2
destdir="${jps.build.output.directory}"
verbose="false"
debug="false"
source="1.6"
target="1.6"
fork="true"
includeantruntime="true" >
<src path="jps-plugin/src"/>
<classpath>
<path location="${common.build.output.directory}"/>
<fileset dir="${idea.ultimate.build}/lib" includes="**/*.jar" />
<!-- Do NOT include the IJ plugins directory in the classpath
when compiling jps. The compiler NPEs.-->
</classpath>
</javac2>
</target>
<target name="compile.common" description="Compile Haxe Plugin Incrementally">
<mkdir dir="${common.build.output.directory}"/>
<javac2
destdir="${common.build.output.directory}"
verbose="false"
debug="true"
source="1.6"
target="1.6"
includeantruntime="true" >
<src path="common/src" />
<classpath>
<fileset dir="${idea.ultimate.build}/lib" includes="**/*.jar" />
<fileset dir="${idea.ultimate.build}/plugins" includes="**/**.jar" />
</classpath>
</javac2>
</target>
<target name="compile.plugin" description="Compile Haxe Plugin Incrementally">
<mkdir dir="${plugin.build.output.directory}"/>
<javac2
destdir="${plugin.build.output.directory}"
verbose="false"
debug="true"
source="1.6"
target="1.6"
includedestclasses="false"
createmissingpackageinfoclass="false"
includeantruntime="false" >
<src path="${version.specific.code.location}" />
<src path="src/common" />
<src path="src/icons" />
<src path="gen" />
<src path="hxcpp-debugger-protocol" />
<classpath>
<pathelement location="${common.build.output.directory}"/>
<fileset dir="${idea.ultimate.build}/lib" includes="**/*.jar" />
<fileset dir="${idea.ultimate.build}/plugins" includes="**/**.jar" />
</classpath>
</javac2>
</target>
<target name="package" depends="compile,generateTemplatedFiles" description="Generate JAR file">
<jar jarfile="intellij-haxe-${idea.version}.jar" update="true">
<fileset dir="resources" />
<fileset dir="gen" includes="META-INF/*.*"/>
<fileset dir="grammar" includes="haxe.bnf"/>
<fileset dir="common/src" includes="**/*.*" excludes="**/*.java"/>
<fileset dir="src/common" includes="com/**" excludes="**/*.java, **/*.form, **/*.flex"/>
<fileset dir="${plugin.build.output.directory}" includes="**/*.*" excludes="src/META-INF/*.*"/>
<fileset dir="${common.build.output.directory}"/>
<fileset dir="${jps.build.output.directory}"/>
<fileset dir="jps-plugin/src/" includes="META-INF/services/**/*.*" />
<zipfileset includes="com/intellij/uiDesigner/core/*.class" src="${idea.ultimate.build}/lib/forms_rt.jar"/>
</jar>
</target>
</project>