build.xml 2.93 KB
Newer Older
1 2
<project name="BytecodeOutline" default="plugin">

ekuleshov's avatar
ekuleshov committed
3 4
  <property file="${user.home}/asm-build.properties"/>
  <property file="build.properties"/>
5

ekuleshov's avatar
ekuleshov committed
6 7 8 9 10 11 12 13
  <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="plugin.jar"   value="${plugin.id}_${plugin.version}.jar"/>
  <property name="feature.jar"  value="${plugin.id}.feature_${plugin.version}.jar"/>
  
14 15 16

  <target name="init">
    <path id="classpath">
ekuleshov's avatar
ekuleshov committed
17 18
      <fileset dir="${externals}" includes="**/*.jar"/>
      <fileset dir="${eclipse.home}" includes="plugins/**/*.jar"/>
19 20 21 22 23 24 25 26 27 28 29 30 31
    </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">
ekuleshov's avatar
ekuleshov committed
32
    <jar jarfile="${out}/BytecodeOutline.jar" basedir="${out.build}">
33 34 35 36 37 38
      <include name="**/*"/>
      <manifest>
        <attribute name="Implementation-Title" value="BytecodeOutline"/>
        <attribute name="Implementation-Version" value="${plugin.version}"/>
      </manifest>
    </jar>
ekuleshov's avatar
ekuleshov committed
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
    
    <zip zipfile="${out}/BytecodeOutlinesrc.zip">
      <zipfileset dir="${src}" includes="**/*" prefix="src"/>
      <fileset dir=".">
        <include name="icons/*"/>
        <include name="plugin.xml"/>
        <include name="build.properties"/>
        <include name="META-INF/*"/>
        <include name="feature.xml"/>
        <include name="site.xml"/>
        <include name="build.xml"/>
        <include name="build.config"/>
        <include name=".project"/>
        <include name=".classpath"/>
        <include name="README.txt"/>
        <include name="LICENSE.txt"/>
      </fileset>
56 57 58 59
    </zip>
  </target>

  <target name="plugin" depends="jars">
ekuleshov's avatar
ekuleshov committed
60 61
    <jar zipfile="${out}/${plugin.jar}" manifest="META-INF/MANIFEST.MF">
      <zipfileset dir="${out}" includes="BytecodeOutline.jar"/>
62
      <fileset dir=".">
ekuleshov's avatar
ekuleshov committed
63
        <include name="externals/*.jar"/>
64 65 66 67
        <include name="icons/**/*"/>
        <include name="plugin.xml"/>
        <include name="*.txt"/>
      </fileset>
ekuleshov's avatar
ekuleshov committed
68 69 70 71 72 73 74 75 76 77 78 79 80 81
    </jar>
  </target>
  
  <target name="feature" depends="plugin">
    <jar zipfile="${out}/${feature.jar}">
      <fileset dir="." includes="feature.xml"/>
    </jar>
  </target>
  
  <target name="site" depends="feature">
    <zip zipfile="${out}/${plugin.id}.update_${plugin.version}.zip">
      <zipfileset dir="." includes="site.xml"/>
      <zipfileset dir="${out}" includes="${feature.jar}" prefix="features"/>
      <zipfileset dir="${out}" includes="${plugin.jar}"  prefix="plugins"/>
82 83 84 85
    </zip>
  </target>
  
  <target name="clean">
ekuleshov's avatar
ekuleshov committed
86 87 88
    <delete failonerror="false" includeEmptyDirs="true">
      <fileset dir="${out}" includes="**/*"/>
    </delete>
89 90 91
  </target>

</project>