| <?xml version="1.0" encoding="ISO-8859-1"?> | |
| <project name="inject-language" default="all"> | |
| <property file="IntelliLang.properties"/> | |
| <!-- Uncomment the following property if no tests compilation is needed --> | |
| <!-- | |
| <property name="skip.tests" value="true"/> | |
| --> | |
| <!-- The task requires the following libraries from IntelliJ IDEA distribution: --> | |
| <!-- javac2.jar; jdom.jar; asm.jar; asm-commons.jar --> | |
| <taskdef name="javac2" classname="com.intellij.ant.Javac2"> | |
| <classpath refid="classpath.uidesigner" /> | |
| </taskdef> | |
| <path id="classpath.uidesigner"> | |
| <path refid="jdk.classpath.idea_8.0" /> | |
| <path> | |
| <fileset dir="${jdk.home.idea_8.0}"> | |
| <include name="redist/javac2.jar" /> | |
| </fileset> | |
| </path> | |
| </path> | |
| <!-- Compiler options --> | |
| <property name="compiler.debug" value="on"/> | |
| <property name="compiler.generate.no.warnings" value="off"/> | |
| <property name="compiler.args" value=""/> | |
| <property name="compiler.max.memory" value="128m"/> | |
| <patternset id="ignored.files"> | |
| <exclude name="**/CVS/**"/> | |
| <exclude name="**/SCCS/**"/> | |
| <exclude name="**/RCS/**"/> | |
| <exclude name="**/rcs/**"/> | |
| <exclude name="**/.dependency-info/**"/> | |
| <exclude name="**/.svn/**"/> | |
| <exclude name="**/.cvsignore/**"/> | |
| </patternset> | |
| <patternset id="compiler.excluded"> | |
| </patternset> | |
| <patternset id="compiler.resources"> | |
| <include name="**/?*.properties"/> | |
| <include name="**/?*.xml"/> | |
| <include name="**/?*.gif"/> | |
| <include name="**/?*.png"/> | |
| <include name="**/?*.jpeg"/> | |
| <include name="**/?*.jpg"/> | |
| <include name="**/?*.html"/> | |
| <include name="**/?*.dtd"/> | |
| <include name="**/?*.tld"/> | |
| </patternset> | |
| <!-- JDK definitions --> | |
| <path id="jdk.classpath.idea_8.0"> | |
| <fileset dir="${jdk.home.idea_8.0}"> | |
| <include name="lib/*.jar" /> | |
| <include name="plugins/xpath/lib/*.jar" /> | |
| </fileset> | |
| </path> | |
| <property name="project.jdk.home" value="${jdk.home.idea_8.0}"/> | |
| <property name="project.jdk.classpath" value="jdk.classpath.idea_8.0"/> | |
| <!-- Global Libraries --> | |
| <!-- Application Server Libraries --> | |
| <!-- Modules --> | |
| <!-- Module regexp-lang-java --> | |
| <dirname property="module.regexp-lang-java.basedir" file="${ant.file}"/> | |
| <property name="module.jdk.home.regexp-lang-java" value="${project.jdk.home}"/> | |
| <property name="module.jdk.classpath.regexp-lang-java" value="${project.jdk.classpath}"/> | |
| <property name="compiler.args.regexp-lang-java" value="${compiler.args}"/> | |
| <property name="regexp-lang-java.output.dir" value="${module.regexp-lang-java.basedir}/../RegExpSupport/build/classes/production"/> | |
| <property name="regexp-lang-java.testoutput.dir" value="${module.regexp-lang-java.basedir}/../RegExpSupport/build/classes/test"/> | |
| <path id="regexp-lang-java.module.bootclasspath"> | |
| <!-- Paths to be included in compilation bootclasspath --> | |
| </path> | |
| <path id="regexp-lang-java.module.classpath"> | |
| <path refid="${module.jdk.classpath.regexp-lang-java}"/> | |
| </path> | |
| <patternset id="excluded.from.module.regexp-lang-java"> | |
| <patternset refid="ignored.files"/> | |
| </patternset> | |
| <patternset id="excluded.from.compilation.regexp-lang-java"> | |
| <patternset refid="compiler.excluded"/> | |
| <patternset refid="excluded.from.module.regexp-lang-java"/> | |
| </patternset> | |
| <path id="regexp-lang-java.module.sourcepath"> | |
| <dirset dir="${module.regexp-lang-java.basedir}/../RegExpSupport"> | |
| <include name="src"/> | |
| </dirset> | |
| </path> | |
| <path id="regexp-lang-java.module.test.sourcepath"> | |
| <dirset dir="${module.regexp-lang-java.basedir}/../RegExpSupport"> | |
| <include name="test"/> | |
| </dirset> | |
| </path> | |
| <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"/> | |
| <target name="compile.module.regexp-lang-java.production" description="Compile module regexp-lang-java; production classes"> | |
| <mkdir dir="${regexp-lang-java.output.dir}"/> | |
| <javac2 destdir="${regexp-lang-java.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5"> | |
| <compilerarg line="${compiler.args.regexp-lang-java}"/> | |
| <bootclasspath refid="regexp-lang-java.module.bootclasspath"/> | |
| <classpath refid="regexp-lang-java.module.classpath"/> | |
| <src refid="regexp-lang-java.module.sourcepath"/> | |
| <patternset refid="excluded.from.compilation.regexp-lang-java"/> | |
| </javac2> | |
| <copy todir="${regexp-lang-java.output.dir}"> | |
| <fileset dir="${module.regexp-lang-java.basedir}/../RegExpSupport/src"> | |
| <patternset refid="compiler.resources"/> | |
| <type type="file"/> | |
| <patternset refid="excluded.from.compilation.regexp-lang-java"/> | |
| </fileset> | |
| </copy> | |
| </target> | |
| <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"> | |
| <mkdir dir="${regexp-lang-java.testoutput.dir}"/> | |
| <javac2 destdir="${regexp-lang-java.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5"> | |
| <compilerarg line="${compiler.args.regexp-lang-java}"/> | |
| <classpath refid="regexp-lang-java.module.classpath"/> | |
| <classpath location="${regexp-lang-java.output.dir}"/> | |
| <src refid="regexp-lang-java.module.test.sourcepath"/> | |
| <patternset refid="excluded.from.compilation.regexp-lang-java"/> | |
| </javac2> | |
| <copy todir="${regexp-lang-java.testoutput.dir}"> | |
| <fileset dir="${module.regexp-lang-java.basedir}/../RegExpSupport/test"> | |
| <patternset refid="compiler.resources"/> | |
| <type type="file"/> | |
| <patternset refid="excluded.from.compilation.regexp-lang-java"/> | |
| </fileset> | |
| </copy> | |
| </target> | |
| <target name="clean.module.regexp-lang-java" description="cleanup module"> | |
| <delete dir="${regexp-lang-java.output.dir}"/> | |
| <delete dir="${regexp-lang-java.testoutput.dir}"/> | |
| </target> | |
| <!-- Module intellij.platform.langInjection --> | |
| <dirname property="module.intellilang.basedir" file="${ant.file}"/> | |
| <property name="module.jdk.home.intellilang" value="${project.jdk.home}"/> | |
| <property name="module.jdk.classpath.intellilang" value="${project.jdk.classpath}"/> | |
| <property name="compiler.args.intellilang" value="${compiler.args}"/> | |
| <property name="intellilang.output.dir" value="${module.intellilang.basedir}/build/classes/production"/> | |
| <property name="intellilang.testoutput.dir" value="${module.intellilang.basedir}/build/classes/test"/> | |
| <path id="intellilang.module.bootclasspath"> | |
| <!-- Paths to be included in compilation bootclasspath --> | |
| </path> | |
| <path id="intellilang.module.classpath"> | |
| <path refid="${module.jdk.classpath.intellilang}"/> | |
| <pathelement location="${regexp-lang-java.output.dir}"/> | |
| <pathelement location="${regexp-lang-java.testoutput.dir}"/> | |
| </path> | |
| <patternset id="excluded.from.module.intellilang"> | |
| <patternset refid="ignored.files"/> | |
| </patternset> | |
| <patternset id="excluded.from.compilation.intellilang"> | |
| <patternset refid="compiler.excluded"/> | |
| <patternset refid="excluded.from.module.intellilang"/> | |
| </patternset> | |
| <path id="intellilang.module.sourcepath"> | |
| <dirset dir="${module.intellilang.basedir}"> | |
| <include name="src"/> | |
| </dirset> | |
| </path> | |
| <target name="compile.module.intellilang" depends="compile.module.intellilang.production,compile.module.intellilang.tests" description="Compile module IntelliLang"/> | |
| <target name="compile.module.intellilang.production" depends="compile.module.regexp-lang-java" description="Compile module IntelliLang; production classes"> | |
| <mkdir dir="${intellilang.output.dir}"/> | |
| <javac2 destdir="${intellilang.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" target="1.5"> | |
| <compilerarg line="${compiler.args.intellilang}"/> | |
| <bootclasspath refid="intellilang.module.bootclasspath"/> | |
| <classpath refid="intellilang.module.classpath"/> | |
| <src refid="intellilang.module.sourcepath"/> | |
| <patternset refid="excluded.from.compilation.intellilang"/> | |
| </javac2> | |
| <copy todir="${intellilang.output.dir}"> | |
| <fileset dir="${module.intellilang.basedir}/src"> | |
| <patternset refid="compiler.resources"/> | |
| <type type="file"/> | |
| <patternset refid="excluded.from.compilation.intellilang"/> | |
| </fileset> | |
| </copy> | |
| </target> | |
| <target name="compile.module.intellilang.tests" depends="compile.module.intellilang.production" description="compile module IntelliLang; test classes" unless="skip.tests"/> | |
| <target name="clean.module.intellilang" description="cleanup module"> | |
| <delete dir="${intellilang.output.dir}"/> | |
| <delete dir="${intellilang.testoutput.dir}"/> | |
| </target> | |
| <target name="init" description="Build initialization"> | |
| <!-- Perform any build initialization in this target --> | |
| </target> | |
| <target name="clean" depends="clean.module.regexp-lang-java, clean.module.intellilang" description="cleanup all"/> | |
| <target name="all" depends="init, clean, compile.module.regexp-lang-java, compile.module.intellilang" description="build all"/> | |
| </project> |