Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 83 lines (72 sloc) 2.839 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
<project xmlns:ivy="antlib:org.apache.ivy.ant" name="clot" default="compile">

  <description>
    Clot IRC client
  </description>

  <exec executable="bin/version" outputproperty="version" />
  <property name="src.clj" location="src"/>
  <property name="build" location="build"/>
  <property name="dist" location="dist"/>
  <property name="lib" value="lib" />
  <property name="jar" location="${dist}/clot-${version}.jar"/>

  <property name="ivy.install.version" value="2.0.0-beta1" />
  <property name="ivy.jar.dir" value="${lib}" />
  <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
  
  <target name="download-ivy" unless="skip.download">
    <mkdir dir="${ivy.jar.dir}"/>
    <echo message="installing ivy..."/>
    <get src="http://repo1.maven.org/maven2/org/apache/ivy/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar"
         dest="${ivy.jar.file}" usetimestamp="true"/>
  </target>
  
  <target name="install-ivy" depends="download-ivy" description="Install ivy">
    <path id="ivy.lib.path">
      <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
    </path>
    <taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant"
             classpathref="ivy.lib.path"/>
  </target>

  <target name="resolve" depends="install-ivy" description="Retrieve dependencies">
    <ivy:retrieve />
  </target>

  <target name="clean"
          description="Remove autogenerated files and directories">
    <delete dir="${build}"/>
    <delete dir="${dist}"/>
    <delete dir="${lib}"/>
  </target>

  <target name="init">
    <tstamp/>
    <mkdir dir="${build}"/>
  </target>

  <target name="compile" depends="init,resolve"
          description="Compile source">
    <java classname="clojure.lang.Compile">
      <classpath>
          <pathelement path="${src.clj}"/>
          <pathelement path="${build}"/>
          <fileset dir="${lib}">
            <include name="**/*.jar"/>
          </fileset>
      </classpath>
      <sysproperty key="clojure.compile.path" value="${build}"/>
      <arg value="com.draines.clot.main"/>
      <arg value="com.draines.clot.irc"/>
      <arg value="com.draines.clot.http"/>
      <arg value="com.draines.clot.handlers.system"/>
      <arg value="com.draines.clot.handlers.google"/>
      <arg value="com.draines.clot.handlers.tumblr"/>
      <arg value="com.draines.clot.handlers.bandname"/>
    </java>
  </target>

  <target name="dist" depends="compile" description="Create jar for distribution">
    <mkdir dir="${dist}"/>
    <jar jarfile="${jar}" basedir="${build}">
      <fileset dir="${src.clj}">
        <include name="**/*.clj"/>
      </fileset>
      <manifest>
        <attribute name="Main-Class" value="com.draines.clot.main"/>
        <attribute name="Class-Path" value="."/>
      </manifest>
    </jar>
  </target>

</project>
Something went wrong with that request. Please try again.