| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <project name="RegExpSupport" default="all"> |
| |
| <property file="regexp-lang.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/**" /> |
| </patternset> |
| <patternset id="compiler.excluded"> |
| </patternset> |
| <patternset id="compiler.resources"> |
| <include name="**/?*.properties" /> |
| <include name="**/?*.xml" /> |
| <include name="**/?*.html" /> |
| <include name="**/?*.gif" /> |
| <include name="**/?*.png" /> |
| <include name="**/?*.jpeg" /> |
| <include name="**/?*.xsd" /> |
| <include name="**/?*.xsl" /> |
| <include name="**/?*.xhtml" /> |
| <include name="**/?*.template" /> |
| </patternset> |
| |
| <!-- JDK definitions --> |
| |
| <path id="jdk.classpath.idea_8.0"> |
| <fileset dir="${jdk.home.idea_8.0}"> |
| <include name="lib/*.jar" /> |
| |
| <include name="lib/tools.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 --> |
| |
| <dirname property="module.regexp-lang.basedir" file="${ant.file}" /> |
| |
| |
| <property name="module.jdk.home.regexp-lang" value="${project.jdk.home}" /> |
| <property name="module.jdk.classpath.regexp-lang" value="${project.jdk.classpath}" /> |
| |
| <property name="compiler.args.regexp-lang" value="${compiler.args}" /> |
| |
| <property name="regexp-lang.output.dir" value="${module.regexp-lang.basedir}/build/classes/production" /> |
| <property name="regexp-lang.testoutput.dir" value="${module.regexp-lang.basedir}/build/classes/test" /> |
| |
| <path id="regexp-lang.module.bootclasspath"> |
| <!-- Paths to be included in compilation bootclasspath --> |
| </path> |
| |
| <path id="regexp-lang.module.classpath"> |
| <path refid="${module.jdk.classpath.regexp-lang}" /> |
| </path> |
| |
| |
| <patternset id="excluded.from.module.regexp-lang"> |
| <patternset refid="ignored.files" /> |
| </patternset> |
| |
| <patternset id="excluded.from.compilation.regexp-lang"> |
| <patternset refid="compiler.excluded" /> |
| <patternset refid="excluded.from.module.regexp-lang" /> |
| </patternset> |
| |
| <path id="regexp-lang.module.sourcepath"> |
| <dirset dir="${module.regexp-lang.basedir}"> |
| <include name="src" /> |
| </dirset> |
| </path> |
| |
| <path id="regexp-lang.module.test.sourcepath"> |
| <dirset dir="${module.regexp-lang.basedir}"> |
| <include name="test" /> |
| </dirset> |
| </path> |
| |
| |
| <target name="compile.module.regexp-lang" |
| depends="compile.module.regexp-lang.production,compile.module.regexp-lang.tests" |
| description="Compile module regexp-lang" /> |
| |
| <target name="compile.module.regexp-lang.production" description="Compile module regexp-lang; production classes"> |
| <mkdir dir="${regexp-lang.output.dir}" /> |
| <javac2 destdir="${regexp-lang.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" |
| memorymaximumsize="${compiler.max.memory}" target="1.5"> |
| <compilerarg line="${compiler.args.regexp-lang}" /> |
| <bootclasspath refid="regexp-lang.module.bootclasspath" /> |
| <classpath refid="regexp-lang.module.classpath" /> |
| <src refid="regexp-lang.module.sourcepath" /> |
| <patternset refid="excluded.from.compilation.regexp-lang" /> |
| </javac2> |
| |
| <copy todir="${regexp-lang.output.dir}"> |
| <fileset dir="${module.regexp-lang.basedir}/src"> |
| <patternset refid="compiler.resources" /> |
| <type type="file" /> |
| <patternset refid="excluded.from.compilation.regexp-lang" /> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="compile.module.regexp-lang.tests" depends="compile.module.regexp-lang.production" |
| description="compile module regexp-lang; test classes" unless="skip.tests"> |
| <mkdir dir="${regexp-lang.testoutput.dir}" /> |
| <javac2 destdir="${regexp-lang.testoutput.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" |
| memorymaximumsize="${compiler.max.memory}" target="1.5"> |
| <compilerarg line="${compiler.args.regexp-lang}" /> |
| <classpath refid="regexp-lang.module.classpath" /> |
| <classpath location="${regexp-lang.output.dir}" /> |
| <src refid="regexp-lang.module.test.sourcepath" /> |
| <patternset refid="excluded.from.compilation.regexp-lang" /> |
| </javac2> |
| |
| <copy todir="${regexp-lang.testoutput.dir}"> |
| <fileset dir="${module.regexp-lang.basedir}/test"> |
| <patternset refid="compiler.resources" /> |
| <type type="file" /> |
| <patternset refid="excluded.from.compilation.regexp-lang" /> |
| </fileset> |
| </copy> |
| </target> |
| |
| <target name="clean.module.regexp-lang" description="cleanup module"> |
| <delete dir="${regexp-lang.output.dir}" /> |
| <delete dir="${regexp-lang.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" description="cleanup all" /> |
| |
| <target name="all" depends="init, clean, compile.module.regexp-lang" description="build all" /> |
| </project> |