build.xml 3.65 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

6 7 8 9
  <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"/>
ekuleshov's avatar
ekuleshov committed
10 11 12 13

  <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
      <fileset dir="${eclipse.home}" includes="plugins/**/*.jar"/>
18
      <fileset dir="${asm.project.dir}" includes="**/*.jar"/>
19 20 21 22 23
    </path>
  </target>

  <target name="compile" depends="init">
    <mkdir dir="${out.build}"/>
24 25
    <!-- Eclipse requires JDK 1.4, also we can set both properties to 1.4 -->
    <javac destdir="${out.build}" debug="on" source="1.4" target="1.4">
26 27 28
      <classpath refid="classpath"/>
      <src path="${src}"/>
      <include name="**/*.java"/>
29
    </javac>      
30 31 32
  </target>

  <target name="jars" depends="compile">
33 34 35 36 37
    <copy todir="${out.build}">
      <fileset dir="${src}">      
        <include name="**/*.properties"/>
      </fileset>
    </copy>      
ekuleshov's avatar
ekuleshov committed
38
    <jar jarfile="${out}/BytecodeOutline.jar" basedir="${out.build}">
39 40 41 42 43 44
      <include name="**/*"/>
      <manifest>
        <attribute name="Implementation-Title" value="BytecodeOutline"/>
        <attribute name="Implementation-Version" value="${plugin.version}"/>
      </manifest>
    </jar>
ekuleshov's avatar
ekuleshov committed
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59
    
    <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="build.xml"/>
        <include name="build.config"/>
        <include name=".project"/>
        <include name=".classpath"/>
        <include name="README.txt"/>
        <include name="LICENSE.txt"/>
      </fileset>
ebruneton's avatar
ebruneton committed
60 61 62 63
      <fileset dir="site">
        <include name="feature.xml"/>
        <include name="site.xml"/>
      </fileset> 
64 65 66
    </zip>
  </target>

67
  <target name="plugin" depends="jars,xslt">
68
    <zip zipfile="${out}/${plugin.jar}">
69
      <zipfileset dir="${out}" includes="BytecodeOutline.jar,BytecodeOutlinesrc.zip"/>
70
      <fileset dir=".">
71
        <include name="META-INF/MANIFEST.MF"/>
72 73
        <include name="icons/**/*"/>
        <include name="plugin.xml"/>
74
        <include name="about.html"/>
75 76
        <include name="*.txt"/>
      </fileset>
77 78
      <fileset dir="${out}/doc" includes="toc.xml"/>
      <zipfileset dir="${out}/doc" includes="*.html" prefix="doc"/>
79
    </zip>
ekuleshov's avatar
ekuleshov committed
80 81 82 83
  </target>
  
  <target name="feature" depends="plugin">
    <jar zipfile="${out}/${feature.jar}">
ebruneton's avatar
ebruneton committed
84
      <fileset dir="site" includes="feature.xml"/>
ekuleshov's avatar
ekuleshov committed
85 86 87 88 89
    </jar>
  </target>
  
  <target name="site" depends="feature">
    <zip zipfile="${out}/${plugin.id}.update_${plugin.version}.zip">
ebruneton's avatar
ebruneton committed
90
      <zipfileset dir="site" includes="site.xml"/>
ekuleshov's avatar
ekuleshov committed
91 92
      <zipfileset dir="${out}" includes="${feature.jar}" prefix="features"/>
      <zipfileset dir="${out}" includes="${plugin.jar}"  prefix="plugins"/>
93 94 95 96
    </zip>
  </target>
  
  <target name="clean">
ekuleshov's avatar
ekuleshov committed
97 98 99
    <delete failonerror="false" includeEmptyDirs="true">
      <fileset dir="${out}" includes="**/*"/>
    </delete>
100 101
  </target>

102 103 104 105 106 107 108 109
	<target name="xslt">
		<mkdir dir="${out}/doc"/>
	  <xslt basedir="." destdir="${out}/doc" includes="opcodes.xml"
	  	    style="opcodes-doc.xsl" force="true">
	  	<factory name="net.sf.saxon.TransformerFactoryImpl"/>
	  </xslt>
	</target>
	
110
</project>