Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 88f667cda9
Fetching contributors…

Cannot retrieve contributors at this time

225 lines (183 sloc) 7.194 kb
<project name="Combinatorics library" default="install" basedir="./">
<description>
Combinatorics Processing library build file.
Based on the official Processing libraries build file.
https://github.com/fjenett/combinatorics
To be able to compile with this you need to fetch yourself these:
compiler.jar (http://code.google.com/p/closure-compiler/downloads/list)
GitHubUploadTask (https://github.com/oyvindkinsey/GitHubUploadTask)
</description>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SETTINGS
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="settings">
<property name="author" value="Florian Jenett"/>
<property name="copyright" value="(c) 2009-2012"/>
<property name="libraryName" value="Combinatorics"/>
<property name="versionNumber" value="0.0.9"/>
<property name="yourLink" value="http://bezier.de/" />
<property name="keywords" value="math, combinatorics, combination, variation, permutation, array"/>
<property name="processing" location="/Users/fjenett/Documents/Processing/libraries"/>
<property name="javaVersion" value="1.5"/>
<property name="resources" value="../_resources/"/>
<property name="libraryClasspath" location="/Applications/Processing.app/Contents/Resources/Java/"/>
<path id="library-classes-add">
<!--fileset dir="lib"></fileset-->
</path>
<path id="library-classpath">
<fileset dir="${libraryClasspath}" >
<include name="core.jar"/>
</fileset>
</path>
<property name="jarFile" value="${libraryName}.jar"/>
<property name="src" location="src"/>
<property name="bin" location="bin"/>
<property name="javadoc" location="documentation"/>
<property name="dist" location="${libraryName}"/>
<property name="build" location="build"/>
<!-- GOOGLE CLOSURE COMPILER -->
<taskdef name="jscomp" classname="com.google.javascript.jscomp.ant.CompileTask"
classpath="${resources}closure-compiler/compiler.jar"/>
<!-- GITHUB upload -->
<!-- <property file="${resources}github.properties" />
<path id="githubhuploadtask.classpath">
<pathelement location="."/>
<fileset dir="${resources}">
<include name="githubupload.jar" />
</fileset>
</path>
<taskdef name="upload"
classname="no.kinsey.ant.GitHubUploadTask"
classpathref="githubhuploadtask.classpath"
loaderref="githubhuploadtask.classpath.loader" /> -->
</target>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INIT
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="init" depends="settings">
<buildnumber file="resources/build.number"/>
<tstamp> <!-- Create the time stamp -->
<format property="date" pattern="MM/dd/yyyy" offset="0" unit="hour"/>
</tstamp>
<echo>Start to build the library ...
${versionNumber}, build #${build.number} on ${date}</echo>
<mkdir dir="${dist}"/>
</target>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
COMPILE
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="compile" depends="init" >
<mkdir dir="${bin}"/>
<javac srcdir="${src}" destdir="${bin}" source="${javaVersion}" target="${javaVersion}">
<classpath>
<path refid="library-classpath"/>
</classpath>
</javac>
<concat destfile="${bin}/${libraryName}.js">
<!-- this list is sorted! -->
<filelist dir="src-js">
<file name="biginteger.js" />
<file name="CombinatoricsBase.js" />
<file name="CombinatoricsBaseSet.js" />
<file name="Variation.js" />
<file name="VariationSet.js" />
<file name="Permutation.js" />
<file name="Combination.js" />
<file name="CombinationSet.js" />
</filelist>
</concat>
</target>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
BUILD
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="build" depends="compile" >
<mkdir dir="${dist}" />
<mkdir dir="${dist}/library" />
<jar jarfile="${dist}/library/${jarFile}" basedir="${bin}"/>
<jscomp compilationLevel="simple"
warning="default"
debug="false"
output="${dist}/library/${libraryName}.js"
prettyprint="true" >
<sources dir="${bin}">
<file name="${libraryName}.js" />
</sources>
</jscomp>
<mkdir dir="${dist}/examples" />
<copy todir="${dist}/examples">
<fileset dir="examples"/>
</copy>
<copy todir="${dist}">
<fileset file="resources/library.properties" />
<fileset file="README" />
</copy>
<replaceregexp file="${dist}/library.properties" flags="g"
match="@@VERSION@@" replace="${build.number}" />
<replaceregexp file="${dist}/library.properties" flags="g"
match="@@PRETTYVERSION@@" replace="${versionNumber}" />
</target>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
DOCUMENTATION
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="documentation" depends="build">
<mkdir dir="${javadoc}" />
<javadoc bottom="processing library ${libraryName} by ${author}. ${copyright}"
destdir="${javadoc}"
verbose="false"
stylesheetfile="resources/stylesheet.css"
doctitle="${libraryName} Java documentation"
public="true" version="false"
windowtitle="${libraryName} Java documentation">
<fileset dir="${src}" defaultexcludes="yes">
<include name="**/*"/>
</fileset>
<classpath>
<path refid="library-classpath" />
</classpath>
</javadoc>
<mkdir dir="${dist}/documentation" />
<copy todir="${dist}/documentation">
<fileset dir="${javadoc}" />
</copy>
</target>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
INSTALL
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="install" depends="build">
<delete dir="${processing}/${libraryName}" />
<mkdir dir="${processing}/${libraryName}" />
<copy todir="${processing}/${libraryName}">
<fileset dir="${dist}"/>
</copy>
</target>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
RELEASE
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="release" depends="documentation">
<zip destfile="releases/${libraryName}-${versionNumber}.zip"
basedir="${dist}"
excludes="**/_DS.Store"
/>
<copy tofile="releases/${libraryName}.zip">
<fileset file="releases/${libraryName}-${versionNumber}.zip" />
</copy>
<copy tofile="releases/${libraryName}.txt">
<fileset file="${dist}/library.properties" />
</copy>
<!-- <upload user="${github.user}"
repo="combinatorics"
username="${github.username}"
token="${github.token}"
description="Release ${versionNumber}"
path="releases/${libraryName}-${versionNumber}.zip" /> -->
</target>
<!-- + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CLEAN
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + -->
<target name="clean" depends="settings" >
<delete dir="${bin}" />
<delete dir="${javadoc}" />
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.