Subversion Repositories wimsdev

Rev

Rev 13128 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2.  
  3. <!--
  4.  
  5.         This is the Ant build script for Plinko.jar.
  6.         to build ,type:
  7.         ant -v
  8.         to clean , type
  9.         ant -v clean
  10.        
  11. -->
  12.  
  13.  
  14. <project name="Plinko" default="jar" basedir=".">
  15.  
  16.         <description>Plinko build file</description>
  17.         <!-- Set global properties for this build. -->
  18.         <property name="version"          value="0.1"/>
  19.         <property name="source-dir"       location="src"/>
  20.         <property name="build"        location="build"/>
  21.         <property name="dist"         location="dist"/>
  22.         <property name="debug"            value="false"/>
  23.         <property name="debuglevel"       value="lines,var,source"/>
  24.         <property name="java-level"       value="1.6"/>
  25.        
  26.         <!-- Compiles the classes.  -->
  27.         <target name="compile" description="Compile the source">
  28.                 <delete includeEmptyDirs="true" quiet="true" dir="${build}"/>
  29.                 <mkdir dir="${build}"/>
  30.                 <mkdir dir="${build}/sounds"/>
  31.                 <javac srcdir="${source-dir}" destdir="${build}"
  32.                     deprecation="yes" debug="${debug}" debuglevel="${debuglevel}"
  33.                     source="${java-level}" target="${java-level}"/>
  34.  
  35.                 <exec executable="/bin/sh">
  36.                     <arg line="-c 'cp ${source-dir}/sounds/*.au ${build}/sounds'"/>
  37.                 </exec>
  38.         </target>
  39.  
  40.         <presetdef name="javac">
  41.             <javac encoding="UTF-8" />
  42.         </presetdef>
  43.  
  44.  
  45.         <!-- Creates the jar file. -->
  46.  
  47.         <target name="jar" depends="compile" description="Create Plinko jar">
  48.                 <mkdir dir="${dist}"/> 
  49.                 <jar destfile="${dist}/Plinko.jar">
  50.                         <fileset dir="${build}"/>
  51.                         <manifest>
  52.                                 <attribute name="Specification-Title" value="Plinko"/>
  53.                                 <attribute name="Specification-Version" value="${version}"/>
  54.                                 <attribute name="Implementation-Title" value="Plinko"/>
  55.                                 <attribute name="Implementation-Version" value="${version}"/>
  56.                                 <section name="Plinko">
  57.                                         <attribute name="Specification-Title" value="Plinko"/>
  58.                                         <attribute name="Specification-Version" value="${version}"/>
  59.                                         <attribute name="Implementation-Title" value="Plinko"/>
  60.                                         <attribute name="Implementation-Version" value="${version}"/>
  61.                                 </section>
  62.                         </manifest>
  63.  
  64.                 </jar>
  65.         </target>
  66.         <target name="clean" description="clean up">
  67.         <!-- Delete the ${build} and ${dist} directory trees -->
  68.             <delete dir="./build"/>
  69.             <delete dir="./dist"/>
  70.         </target>
  71.  
  72.  
  73. </project>
  74.