Skeleton project for building Java using Ant and Ivy
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.xml 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <project name="com.dmdirc.updater" default="dist" basedir=".">
  2. <description>Generic updater system used by DMDirc</description>
  3. <import file="build-ivy.xml"/>
  4. <property name="src" location="src"/>
  5. <property name="build" location="build"/>
  6. <property name="dist" location="dist"/>
  7. <target name="init" depends="-init-dependencies">
  8. <mkdir dir="${build}"/>
  9. </target>
  10. <target name="compile" depends="init" description="compile the source">
  11. <javac srcdir="${src}" destdir="${build}" includeantruntime="false"/>
  12. </target>
  13. <target name="-init-version">
  14. <path id="jgit-classpath">
  15. <fileset dir="lib">
  16. <include name="**/*.jar"/>
  17. </fileset>
  18. </path>
  19. <taskdef name="git-describe" classname="org.mdonoughe.JGitDescribeTask" classpathref="jgit-classpath"/>
  20. </target>
  21. <target name="dist" depends="compile,-init-version" description="generate the distribution">
  22. <mkdir dir="${dist}"/>
  23. <git-describe dir=".git" property="version" />
  24. <jar jarfile="${dist}/updater-${version}.jar" basedir="${build}"/>
  25. </target>
  26. <target name="clean" description="clean up">
  27. <delete dir="${build}"/>
  28. <delete dir="${dist}"/>
  29. </target>
  30. </project>