| <project default="all" name="xpath-lang"> |
| |
| <property file="build.properties"/> |
| |
| <dirname file="${ant.file}" property="project.dir" /> |
| <property name="src.dir" value="${project.dir}/src" /> |
| |
| <property name="build.dir" value="${basedir}/build" /> |
| <property name="build.classes.dir" value="${build.dir}/classes" /> |
| |
| <path id="idea.classpath"> |
| <fileset dir="${idea.home}"> |
| <include name="lib/*.jar"/> |
| <include name="redist/*.jar"/> |
| </fileset> |
| </path> |
| |
| <path id="classpath.uidesigner"> |
| <fileset dir="${idea.home}"> |
| <include name="lib/*.jar"/> |
| <include name="redist/*.jar"/> |
| </fileset> |
| </path> |
| |
| <taskdef name="javac2" classname="com.intellij.ant.Javac2"> |
| <classpath refid="classpath.uidesigner" /> |
| </taskdef> |
| <taskdef name="jflex" classname="JFlex.anttask.JFlexTask"> |
| <classpath location="${idea.home}/tools/jflex/lib/JFlex.jar"/> |
| </taskdef> |
| |
| <target name="init"> |
| </target> |
| |
| <target name="jflex" depends="init"> |
| <jflex skeleton="${idea.home}/tools/jflex/idea-flex.skeleton" nobak="true" |
| file="${src.dir}/org/intellij/lang/xpath/xpath-lexer.flex" destdir="${src.dir}" charat="true"/> |
| </target> |
| |
| <target name="compile" depends="init, jflex"> |
| <mkdir dir="${build.classes.dir}"/> |
| <mkdir dir="${build.dir}/xslt-rt/classes"/> |
| |
| <javac2 srcdir="${src.dir}" destdir="${build.classes.dir}" source="1.5" target="1.5" debug="${compile.debug}" optimize="${compile.optimize}"> |
| <classpath refid="idea.classpath"/> |
| <exclude name="com/**/*" /> |
| </javac2> |
| |
| <javac2 srcdir="../xslt-rt/src" destdir="${build.dir}/xslt-rt/classes" source="1.4" target="1.4" debug="${compile.debug}" optimize="${compile.optimize}"> |
| <exclude name="com/**/*" /> |
| </javac2> |
| </target> |
| |
| <target name="build" depends="compile" description="Build project"/> |
| |
| <target name="jar" depends="build"> |
| <jar file="${build.dir}/xpath-lang.jar" compress="false"> |
| <zipfileset dir="${build.classes.dir}"> |
| <include name="**/*"/> |
| <exclude name="**/run/rt/*"/> |
| </zipfileset> |
| <zipfileset dir="${src.dir}"> |
| <include name="icons/**/*"/> |
| <include name="intentionDescriptions/**/*.*"/> |
| <include name="inspectionDescriptions/**/*.*"/> |
| <include name="**/*.xml"/> |
| <include name="**/*.xsd"/> |
| <include name="**/*.xsl"/> |
| <include name="**/*.xhtml"/> |
| </zipfileset> |
| <zipfileset dir="${project.dir}"> |
| <include name="LICENSE"/> |
| <include name="W3C Document License.htm"/> |
| <include name="META-INF/*.*" unless="xpath-lang.embedded"/> |
| </zipfileset> |
| </jar> |
| |
| <jar file="${build.dir}/xslt-rt/xslt-rt.jar" compress="false"> |
| <zipfileset dir="${build.dir}/xslt-rt/classes"> |
| <include name="**/run/rt/**/*"/> |
| </zipfileset> |
| </jar> |
| </target> |
| |
| <target name="all" depends="compile, jar"/> |
| |
| <target name="clean"> |
| <delete dir="${build.dir}"/> |
| </target> |
| </project> |