Skip to content

Instantly share code, notes, and snippets.

@sattvik
Created April 21, 2010 10:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sattvik/373685 to your computer and use it in GitHub Desktop.
Save sattvik/373685 to your computer and use it in GitHub Desktop.
<?xml version='1.0' encoding='utf-8'?>
<!--
Copyright © 2010 Daniel Solano Gómez
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-->
<project name='vimclojure' basedir='.' default='all'>
<description>
A Vim filetype plugin for Clojure.
</description>
<!-- load all properties from environment and files -->
<property environment='env'/>
<property file='build.properties'/>
<property file='default.properties'/>
<!-- project properties -->
<property name='project.org' value='Sattvik Software &amp; Technology Resources, Ltd. Co.'/>
<property name='project.name' value='${ant.project.name}'/>
<property name='project.version' value='2.2.0-SNAPSHOT'/>
<property name='project.name-ver' value='${project.name}-${project.version}'/>
<!-- build properties -->
<property name='build.debug' value='false'/>
<!-- source directories -->
<property name='src.dir' location='src'/>
<property name='src.main.dir' location='${src.dir}/main'/>
<property name='src.java.dir' location='${src.main.dir}/java'/>
<property name='src.clojure.dir' location='${src.main.dir}/clojure'/>
<!-- build directories -->
<property name='build.dir' location='build'/>
<property name='build.classes.dir' location='${build.dir}/classes'/>
<!-- distribution directories -->
<property name='dist.dir' location='dist'/>
<!-- distribution targets -->
<property name='target.name' value='${project.name-ver}'/>
<property name='target.jar' location='${dist.dir}/${target.name}.jar'/>
<property name='target.vim.zip' location='${dist.dir}/${target.name}-vim.zip'/>
<!-- library directories and JARs -->
<property name='lib.dir' location='lib'/>
<property name='clojure.jar' location='${lib.dir}/clojure.jar'/>
<property name='nailgun.jar' location='${lib.dir}/nailgun.jar'/>
<!-- build classpaths -->
<path id='clojure.classpath'>
<pathelement location='${clojure.jar}'/>
</path>
<path id='nailgun.classpath'>
<pathelement location='${nailgun.jar}'/>
</path>
<path id='build.java.classpath'>
<path refid='clojure.classpath'/>
<path refid='nailgun.classpath'/>
</path>
<!-- filesets -->
<fileset id='src.clojure.fileset' dir='${src.clojure.dir}'>
<include name='**/*.clj'/>
</fileset>
<fileset id='jar.fileset' dir='${build.classes.dir}'>
<include name='**/*.class'/>
</fileset>
<fileset id='checksum.fileset' dir='${dist.dir}'>
<include name='*.jar'/>
</fileset>
<!-- Main targets -->
<target name='all' depends='dist'
description='Default target—an alias for dist'/>
<target name='dist' depends='jar,checksum'
description='Creates distribution files.'/>
<target name='clean'
description='Clean generated files.'>
<delete dir='${build.dir}'/>
</target>
<target name='distclean' depends='clean'
description='Cleans all generated files including distribution files.'>
<delete dir='${dist.dir}'/>
</target>
<!-- helper targets -->
<target name='init'>
<tstamp/>
</target>
<target name='compile' depends='compile.java'/>
<target name='compile.java' depends='compile.init'>
<javac
destdir='${build.classes.dir}'
classpathref='build.java.classpath'
debug='${build.debug}'
debuglevel='lines,var,source'>
<src path='${src.java.dir}'/>
</javac>
</target>
<target name='compile.init' depends='init'>
<mkdir dir='${build.classes.dir}'/>
</target>
<target name='jar' depends='compile,dist.init'>
<jar
destfile='${target.jar}'
strict='fail'>
<fileset refid='jar.fileset'/>
<fileset refid='src.clojure.fileset'/>
<manifest>
<attribute name='Implementation-Vendor' value='${project.org}'/>
<attribute name='Implementation-Title' value='${project.name}'/>
<attribute name='Implementation-Version' value='${project.version}'/>
</manifest>
</jar>
</target>
<target name='dist.init'>
<mkdir dir='${dist.dir}'/>
</target>
<target name='checksum' depends='jar'>
<checksum todir='${dist.dir}'
algorithm='SHA-256'
fileext='.sha256' format='MD5SUM'>
<fileset refid='checksum.fileset'/>
</checksum>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment