Source

lqpl / build.xml

Full commit
<?xml version="1.0" encoding="UTF-8"?>
<project name="lqpl_gui" default="all">


  <property file="lqpl_gui.properties"/>
  <!-- Uncomment the following property if no tests compilation is needed -->
  <!--
  <property name="skip.tests" value="true"/>
   -->

  <!-- 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="**/.DS_Store/**"/>
    <exclude name="**/.git/**"/>
    <exclude name="**/*~/**"/>
    <exclude name="**/.bundle/**"/>
    <exclude name="**/*.rbc/**"/>
  </patternset>
  <patternset id="library.patterns">
    <include name="*.war"/>
    <include name="*.zip"/>
    <include name="*.jar"/>
  </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="**/?*.form"/>
    <include name="**/?*.dtd"/>
    <include name="**/?*.tld"/>
    <include name="**/?*.ftl"/>
  </patternset>

    <patternset id="ruby.resources">
        <include name="**/*.rb"/>
        <include name="**/run_configuration"/>
    </patternset>

  <!-- JDK definitions -->

  <property name="jdk.bin.1.6" value="${jdk.home.1.6}/bin"/>
  <path id="jdk.classpath.1.6">
    <fileset dir="${jdk.home.1.6}">
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/deploy.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/dt.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/javaws.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/jce.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/management-agent.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/plugin.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/sa-jdi.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/charsets.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/classes.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/dt.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/jce.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/jconsole.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/jsse.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/laf.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/management-agent.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/../Classes/ui.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/apple_provider.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/dnsns.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/localedata.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunjce_provider.jar"/>
      <include name="../../../../../Frameworks/JavaVM.framework/Versions/1.6.0/Home/lib/ext/sunpkcs11.jar"/>
    </fileset>
  </path>

  <property name="project.jdk.home" value="${jdk.home.1.6}"/>
  <property name="project.jdk.bin" value="${jdk.bin.1.6}"/>
  <property name="project.jdk.classpath" value="jdk.classpath.1.6"/>


  <!-- Project Libraries -->

  <path id="library.java.classpath">
    <pathelement location="${basedir}/lib/java/jruby-complete.jar"/>
    <pathelement location="${basedir}/lib/java/monkeybars-1.1.1.jar"/>
      <pathelement location="${basedir}/lib/java/forms_rt.jar"/>
  </path>

  <path id="library.jemmy.classpath">
    <pathelement location="${basedir}/devlib/java/jemmy-2.3.0.0.jar"/>
  </path>


  <!-- Global Libraries -->


  <!-- Register Custom Compiler Taskdefs -->
  <property name="javac2.home" value="${idea.home}/lib"/>
  <path id="javac2.classpath">
    <pathelement location="${javac2.home}/javac2.jar"/>
    <pathelement location="${javac2.home}/jdom.jar"/>
    <pathelement location="${javac2.home}/asm.jar"/>
    <pathelement location="${javac2.home}/asm-commons.jar"/>
    <pathelement location="${javac2.home}/jgoodies-forms.jar"/>
  </path>
  <target name="register.custom.compilers">
    <taskdef name="javac2" classname="com.intellij.ant.Javac2" classpathref="javac2.classpath"/>
    <taskdef name="instrumentIdeaExtensions" classname="com.intellij.ant.InstrumentIdeaExtensions" classpathref="javac2.classpath"/>
  </target>

  <!-- Modules -->


  <!-- Module lqpl_gui -->

  <dirname property="module.lqpl_gui.basedir" file="${ant.file}"/>


  <property name="module.jdk.home.lqpl_gui" value="${project.jdk.home}"/>
  <property name="module.jdk.bin.lqpl_gui" value="${project.jdk.bin}"/>
  <property name="module.jdk.classpath.lqpl_gui" value="${project.jdk.classpath}"/>

  <property name="compiler.args.lqpl_gui" value="${compiler.args}"/>

  <property name="lqpl_gui.output.dir" value="${module.lqpl_gui.basedir}/out/production/lqpl_gui"/>
  <property name="lqpl_gui.testoutput.dir" value="${module.lqpl_gui.basedir}/out/test/lqpl_gui"/>

  <path id="lqpl_gui.module.bootclasspath">
    <!-- Paths to be included in compilation bootclasspath -->
  </path>

  <path id="lqpl_gui.module.production.classpath">
    <path refid="${module.jdk.classpath.lqpl_gui}"/>
    <path refid="library.java.classpath"/>
  </path>

  <path id="lqpl_gui.runtime.production.module.classpath">
    <pathelement location="${lqpl_gui.output.dir}"/>
    <path refid="library.java.classpath"/>
    <path refid="library.jemmy.classpath"/>
  </path>


  <patternset id="excluded.from.module.lqpl_gui">
    <patternset refid="ignored.files"/>
  </patternset>

  <patternset id="excluded.from.compilation.lqpl_gui">
    <patternset refid="excluded.from.module.lqpl_gui"/>
  </patternset>

  <path id="lqpl_gui.module.sourcepath">
    <dirset dir="${module.lqpl_gui.basedir}">
      <include name="src"/>
    </dirset>
  </path>


  <target name="compile.module.lqpl_gui" depends="compile.module.lqpl_gui.production,compile.module.lqpl_gui.tests" description="Compile module lqpl_gui"/>

  <target name="compile.module.lqpl_gui.production" depends="register.custom.compilers" description="Compile module lqpl_gui; production classes">
    <mkdir dir="${lqpl_gui.output.dir}"/>
    <javac2 destdir="${lqpl_gui.output.dir}" debug="${compiler.debug}" nowarn="${compiler.generate.no.warnings}" memorymaximumsize="${compiler.max.memory}" fork="true" executable="${module.jdk.bin.lqpl_gui}/javac">
      <compilerarg line="${compiler.args.lqpl_gui}"/>
      <bootclasspath refid="lqpl_gui.module.bootclasspath"/>
      <classpath refid="lqpl_gui.module.production.classpath"/>
      <src refid="lqpl_gui.module.sourcepath"/>
      <patternset refid="excluded.from.compilation.lqpl_gui"/>
    </javac2>

    <copy todir="${lqpl_gui.output.dir}">
      <fileset dir="${module.lqpl_gui.basedir}/src">
        <patternset refid="compiler.resources"/>
        <type type="file"/>
      </fileset>
    </copy>
      <copy todir="${lqpl_gui.output.dir}">
          <fileset dir="${module.lqpl_gui.basedir}/src">
              <patternset refid="ruby.resources"/>
              <type type="file"/>
          </fileset>
      </copy>
  </target>

  <target name="compile.module.lqpl_gui.tests" depends="register.custom.compilers,compile.module.lqpl_gui.production" description="compile module lqpl_gui; test classes" unless="skip.tests"/>

  <target name="clean.module.lqpl_gui" description="cleanup module">
    <delete dir="${lqpl_gui.output.dir}"/>
    <delete dir="${lqpl_gui.testoutput.dir}"/>
  </target>

  <target name="init" description="Build initialization">
    <!-- Perform any build initialization in this target -->
  </target>

  <target name="clean" depends="clean.module.lqpl_gui" description="cleanup all"/>

  <target name="build.modules" depends="init, clean, compile.module.lqpl_gui" description="build all modules"/>

  <target name="all" depends="build.modules" description="build all"/>
</project>