build.xml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <?xml version="1.0"?>
  2. <project name="tt-irc" default="default">
  3. <property name="src" location="daemon/src"/>
  4. <property name="bin" location="out/production/daemon"/>
  5. <path id="project.libpath">
  6. <fileset dir="daemon/libs/">
  7. <include name="**/*.jar"/>
  8. </fileset>
  9. </path>
  10. <pathconvert property="manifest.classpath" pathsep=" ">
  11. <path refid="project.libpath"/>
  12. <chainedmapper>
  13. <flattenmapper/>
  14. <globmapper from="*" to="daemon/libs/*"/>
  15. </chainedmapper>
  16. </pathconvert>
  17. <target name="compile" depends="">
  18. <mkdir dir="${bin}"/>
  19. <javac srcdir="${src}" destdir="${bin}">
  20. <classpath>
  21. <pathelement path="${classpath}"/>
  22. <path refid="project.libpath"/>
  23. </classpath>
  24. </javac>
  25. </target>
  26. <target name="default" depends="jar">
  27. </target>
  28. <target name="buildnumber" depends="compile">
  29. <buildnumber file="build.number"/>
  30. <tstamp>
  31. <format property="TODAY" pattern="yyyy-MM-dd HH:mm:ss" />
  32. <format property="TODAY_SHORT" pattern="yyyy-MM-dd" />
  33. </tstamp>
  34. </target>
  35. <target name="jar" depends="buildnumber">
  36. <delete file="backend.jar"/>
  37. <delete file="manifest.mf"/>
  38. <manifest file="manifest.mf">
  39. <attribute name="Built-By" value="${user.name}"/>
  40. <attribute name="Main-Class" value="org.fox.ttirc.Master"/>
  41. <attribute name="Implementation-Version"
  42. value="Build ${build.number}; ${TODAY_SHORT}"/>
  43. <attribute name="Built-Date" value="${TODAY}"/>
  44. <attribute name="Class-Path" value="${manifest.classpath}"/>
  45. </manifest>
  46. <jar destfile="backend.jar" basedir="${bin}" includes="**/*.class"
  47. manifest="manifest.mf"/>
  48. </target>
  49. <target name="clean">
  50. <delete dir="${bin}"/>
  51. <delete file="manifest.mf"/>
  52. <delete file="backend.jar"/>
  53. </target>
  54. </project>