IDEADEV-27803
[fedora-idea.git] / plugins / IntelliLang / IntelliLang.xml
blob4bb774c215096cdcb3e35c25948fdb79a328b961
1 <?xml version="1.0" encoding="ISO-8859-1"?>
2 <project name="inject-language" default="all">
5   <property file="IntelliLang.properties"/>
6   <!-- Uncomment the following property if no tests compilation is needed -->
7   <!--
8   <property name="skip.tests" value="true"/>
9    -->
11   <!-- The task requires the following libraries from IntelliJ IDEA distribution: -->
12   <!--   javac2.jar; jdom.jar; asm.jar; asm-commons.jar -->
13   <taskdef name="javac2" classname="com.intellij.ant.Javac2">
14     <classpath refid="classpath.uidesigner" />
15   </taskdef>
17   <path id="classpath.uidesigner">
18     <path refid="jdk.classpath.idea_8.0" />
19     <path>
20       <fileset dir="${jdk.home.idea_8.0}">
21         <include name="redist/javac2.jar" />
22       </fileset>
23     </path>
24   </path>
26   <!-- Compiler options -->
28   <property name="compiler.debug" value="on"/>
29   <property name="compiler.generate.no.warnings" value="off"/>
30   <property name="compiler.args" value=""/>
31   <property name="compiler.max.memory" value="128m"/>
32   <patternset id="ignored.files">
33     <exclude name="**/CVS/**"/>
34     <exclude name="**/SCCS/**"/>
35     <exclude name="**/RCS/**"/>
36     <exclude name="**/rcs/**"/>
37     <exclude name="**/.dependency-info/**"/>
38     <exclude name="**/.svn/**"/>
39     <exclude name="**/.cvsignore/**"/>
40   </patternset>
41   <patternset id="compiler.excluded">
42   </patternset>
43   <patternset id="compiler.resources">
44     <include name="**/?*.properties"/>
45     <include name="**/?*.xml"/>
46     <include name="**/?*.gif"/>
47     <include name="**/?*.png"/>
48     <include name="**/?*.jpeg"/>
49     <include name="**/?*.jpg"/>
50     <include name="**/?*.html"/>
51     <include name="**/?*.dtd"/>
52     <include name="**/?*.tld"/>
53   </patternset>
55   <!-- JDK definitions -->
57   <path id="jdk.classpath.idea_8.0">
58     <fileset dir="${jdk.home.idea_8.0}">
59       <include name="lib/*.jar" />
60     </fileset>
61   </path>
63   <property name="project.jdk.home" value="${jdk.home.idea_8.0}"/>
64   <property name="project.jdk.classpath" value="jdk.classpath.idea_8.0"/>
67   <!-- Global Libraries -->
70   <!-- Application Server Libraries -->
72   <!-- Modules -->
75   <!-- Module annotations -->
77   <dirname property="module.annotations.basedir" file="${ant.file}"/>
80   <property name="module.jdk.home.annotations" value="${project.jdk.home}"/>
81   <property name="module.jdk.classpath.annotations" value="${project.jdk.classpath}"/>
83   <property name="compiler.args.annotations" value="${compiler.args}"/>
85   <property name="annotations.output.dir" value="${module.annotations.basedir}/annotations/classes"/>
86   <property name="annotations.testoutput.dir" value="${module.annotations.basedir}/annotations/classes"/>
88   <path id="annotations.module.bootclasspath">
89     <!-- Paths to be included in compilation bootclasspath -->
90   </path>
92   <path id="annotations.module.classpath">
93     <path refid="${module.jdk.classpath.annotations}"/>
94   </path>
97   <patternset id="excluded.from.module.annotations">
98     <patternset refid="ignored.files"/>
99   </patternset>
101   <patternset id="excluded.from.compilation.annotations">
102     <patternset refid="compiler.excluded"/>
103     <patternset refid="excluded.from.module.annotations"/>
104   </patternset>
106   <path id="annotations.module.sourcepath">
107     <dirset dir="${module.annotations.basedir}/annotations">
108       <include name="src"/>
109     </dirset>
110   </path>
113   <target name="compile.module.annotations" depends="compile.module.annotations.production,compile.module.annotations.tests" description="Compile module annotations"/>
115   <target name="compile.module.annotations.production" description="Compile module annotations; production classes">
116     <mkdir dir="${annotations.output.dir}"/>
117     <javac2 destdir="${annotations.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5">
118       <compilerarg line="${compiler.args.annotations}"/>
119       <bootclasspath refid="annotations.module.bootclasspath"/>
120       <classpath refid="annotations.module.classpath"/>
121       <src refid="annotations.module.sourcepath"/>
122       <patternset refid="excluded.from.compilation.annotations"/>
123     </javac2>
125     <copy todir="${annotations.output.dir}">
126       <fileset dir="${module.annotations.basedir}/annotations/src">
127         <patternset refid="compiler.resources"/>
128         <type type="file"/>
129         <patternset refid="excluded.from.compilation.annotations"/>
130       </fileset>
131     </copy>
132   </target>
134   <target name="compile.module.annotations.tests" depends="compile.module.annotations.production" description="compile module annotations; test classes" unless="skip.tests"/>
136   <target name="clean.module.annotations" description="cleanup module">
137     <delete dir="${annotations.output.dir}"/>
138     <delete dir="${annotations.testoutput.dir}"/>
139   </target>
142   <!-- Module regexp-lang-java -->
144   <dirname property="module.regexp-lang-java.basedir" file="${ant.file}"/>
147   <property name="module.jdk.home.regexp-lang-java" value="${project.jdk.home}"/>
148   <property name="module.jdk.classpath.regexp-lang-java" value="${project.jdk.classpath}"/>
150   <property name="compiler.args.regexp-lang-java" value="${compiler.args}"/>
152   <property name="regexp-lang-java.output.dir" value="${module.regexp-lang-java.basedir}/../RegExpSupport/build/classes/production"/>
153   <property name="regexp-lang-java.testoutput.dir" value="${module.regexp-lang-java.basedir}/../RegExpSupport/build/classes/test"/>
155   <path id="regexp-lang-java.module.bootclasspath">
156     <!-- Paths to be included in compilation bootclasspath -->
157   </path>
159   <path id="regexp-lang-java.module.classpath">
160     <path refid="${module.jdk.classpath.regexp-lang-java}"/>
161   </path>
164   <patternset id="excluded.from.module.regexp-lang-java">
165     <patternset refid="ignored.files"/>
166   </patternset>
168   <patternset id="excluded.from.compilation.regexp-lang-java">
169     <patternset refid="compiler.excluded"/>
170     <patternset refid="excluded.from.module.regexp-lang-java"/>
171   </patternset>
173   <path id="regexp-lang-java.module.sourcepath">
174     <dirset dir="${module.regexp-lang-java.basedir}/../RegExpSupport">
175       <include name="src"/>
176     </dirset>
177   </path>
179   <path id="regexp-lang-java.module.test.sourcepath">
180     <dirset dir="${module.regexp-lang-java.basedir}/../RegExpSupport">
181       <include name="test"/>
182     </dirset>
183   </path>
186   <target name="compile.module.regexp-lang-java" depends="compile.module.regexp-lang-java.production,compile.module.regexp-lang-java.tests" description="Compile module regexp-lang-java"/>
188   <target name="compile.module.regexp-lang-java.production" description="Compile module regexp-lang-java; production classes">
189     <mkdir dir="${regexp-lang-java.output.dir}"/>
190     <javac2 destdir="${regexp-lang-java.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5">
191       <compilerarg line="${compiler.args.regexp-lang-java}"/>
192       <bootclasspath refid="regexp-lang-java.module.bootclasspath"/>
193       <classpath refid="regexp-lang-java.module.classpath"/>
194       <src refid="regexp-lang-java.module.sourcepath"/>
195       <patternset refid="excluded.from.compilation.regexp-lang-java"/>
196     </javac2>
198     <copy todir="${regexp-lang-java.output.dir}">
199       <fileset dir="${module.regexp-lang-java.basedir}/../RegExpSupport/src">
200         <patternset refid="compiler.resources"/>
201         <type type="file"/>
202         <patternset refid="excluded.from.compilation.regexp-lang-java"/>
203       </fileset>
204     </copy>
205   </target>
207   <target name="compile.module.regexp-lang-java.tests" depends="compile.module.regexp-lang-java.production" description="compile module regexp-lang-java; test classes" unless="skip.tests">
208     <mkdir dir="${regexp-lang-java.testoutput.dir}"/>
209     <javac2 destdir="${regexp-lang-java.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5">
210       <compilerarg line="${compiler.args.regexp-lang-java}"/>
211       <classpath refid="regexp-lang-java.module.classpath"/>
212       <classpath location="${regexp-lang-java.output.dir}"/>
213       <src refid="regexp-lang-java.module.test.sourcepath"/>
214       <patternset refid="excluded.from.compilation.regexp-lang-java"/>
215     </javac2>
217     <copy todir="${regexp-lang-java.testoutput.dir}">
218       <fileset dir="${module.regexp-lang-java.basedir}/../RegExpSupport/test">
219         <patternset refid="compiler.resources"/>
220         <type type="file"/>
221         <patternset refid="excluded.from.compilation.regexp-lang-java"/>
222       </fileset>
223     </copy>
224   </target>
226   <target name="clean.module.regexp-lang-java" description="cleanup module">
227     <delete dir="${regexp-lang-java.output.dir}"/>
228     <delete dir="${regexp-lang-java.testoutput.dir}"/>
229   </target>
232   <!-- Module IntelliLang -->
234   <dirname property="module.intellilang.basedir" file="${ant.file}"/>
237   <property name="module.jdk.home.intellilang" value="${project.jdk.home}"/>
238   <property name="module.jdk.classpath.intellilang" value="${project.jdk.classpath}"/>
240   <property name="compiler.args.intellilang" value="${compiler.args}"/>
242   <property name="intellilang.output.dir" value="${module.intellilang.basedir}/build/classes/production"/>
243   <property name="intellilang.testoutput.dir" value="${module.intellilang.basedir}/build/classes/test"/>
245   <path id="intellilang.module.bootclasspath">
246     <!-- Paths to be included in compilation bootclasspath -->
247   </path>
249   <path id="intellilang.module.classpath">
250     <path refid="${module.jdk.classpath.intellilang}"/>
251     <pathelement location="${annotations.output.dir}"/>
252     <pathelement location="${regexp-lang-java.output.dir}"/>
253     <pathelement location="${regexp-lang-java.testoutput.dir}"/>
254   </path>
257   <patternset id="excluded.from.module.intellilang">
258     <patternset refid="ignored.files"/>
259   </patternset>
261   <patternset id="excluded.from.compilation.intellilang">
262     <patternset refid="compiler.excluded"/>
263     <patternset refid="excluded.from.module.intellilang"/>
264   </patternset>
266   <path id="intellilang.module.sourcepath">
267     <dirset dir="${module.intellilang.basedir}">
268       <include name="src"/>
269     </dirset>
270   </path>
273   <target name="compile.module.intellilang" depends="compile.module.intellilang.production,compile.module.intellilang.tests" description="Compile module IntelliLang"/>
275   <target name="compile.module.intellilang.production" depends="compile.module.annotations,compile.module.regexp-lang-java" description="Compile module IntelliLang; production classes">
276     <mkdir dir="${intellilang.output.dir}"/>
277     <javac2 destdir="${intellilang.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5">
278       <compilerarg line="${compiler.args.intellilang}"/>
279       <bootclasspath refid="intellilang.module.bootclasspath"/>
280       <classpath refid="intellilang.module.classpath"/>
281       <src refid="intellilang.module.sourcepath"/>
282       <patternset refid="excluded.from.compilation.intellilang"/>
283     </javac2>
285     <copy todir="${intellilang.output.dir}">
286       <fileset dir="${module.intellilang.basedir}/src">
287         <patternset refid="compiler.resources"/>
288         <type type="file"/>
289         <patternset refid="excluded.from.compilation.intellilang"/>
290       </fileset>
291     </copy>
292   </target>
294   <target name="compile.module.intellilang.tests" depends="compile.module.intellilang.production" description="compile module IntelliLang; test classes" unless="skip.tests"/>
296   <target name="clean.module.intellilang" description="cleanup module">
297     <delete dir="${intellilang.output.dir}"/>
298     <delete dir="${intellilang.testoutput.dir}"/>
299   </target>
301   <target name="init" description="Build initialization">
302     <!-- Perform any build initialization in this target -->
303   </target>
305   <target name="clean" depends="clean.module.annotations, clean.module.regexp-lang-java, clean.module.intellilang" description="cleanup all"/>
307   <target name="all" depends="init, clean, compile.module.annotations, compile.module.regexp-lang-java, compile.module.intellilang" description="build all"/>
308 </project>