build.xml 1.89 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
<project name="BytecodeOutline" default="plugin">

  <property file="build.config"/>

  <property name="src"                value="${basedir}/src"/>
  <property name="externals"          value="${basedir}/externals"/>
  <property name="out"                value="${basedir}/output"/>
  <property name="out.build"          value="${out}/build"/>
  <property name="out.plugin"         value="${out}/plugin"/>

  <target name="init">
    <path id="classpath">
      <fileset dir="${externals}">
        <include name="**/*.jar"/>
      </fileset>
      <fileset dir="${eclipse}">
        <include name="plugins/**/*.jar"/>
      </fileset>
    </path>
  </target>

  <target name="compile" depends="init">
    <mkdir dir="${out.build}"/>
    <javac destdir="${out.build}" debug="on">
      <classpath refid="classpath"/>
      <src path="${src}"/>
      <include name="**/*.java"/>
    </javac>
  </target>

  <target name="jars" depends="compile">
    <mkdir dir="${out.plugin}"/>
    <jar jarfile="${out.plugin}/BytecodeOutline.jar" basedir="${out.build}">
      <include name="**/*"/>
      <manifest>
        <attribute name="Implementation-Title" value="BytecodeOutline"/>
        <attribute name="Implementation-Version" value="${plugin.version}"/>
      </manifest>
    </jar>
    <zip zipfile="${out.plugin}/BytecodeOutlinesrc.zip" basedir="${src}">
      <include name="**/*"/>
    </zip>
  </target>

  <target name="plugin" depends="jars">
    <copy todir="${out.plugin}">
      <fileset dir=".">
        <include name="externals/**/*"/>
        <include name="icons/**/*"/>
50
        <include name="META-INF/**/*"/>
51 52 53 54 55 56 57 58 59 60 61 62 63 64
        <include name="plugin.xml"/>
        <include name="*.txt"/>
      </fileset>
    </copy>
    <zip zipfile="${out}/${plugin.id}_${plugin.version}.zip" basedir="${out.plugin}">
      <include name="**/*"/>
    </zip>
  </target>
  
  <target name="clean">
    <delete dir="${out}"/>
  </target>

</project>