Permalink
Fetching contributors…
Cannot retrieve contributors at this time
195 lines (173 sloc) 6.06 KB
<project
name="scalacheck"
basedir="." default="build"
xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<path
id="maven-ant-tasks.classpath"
path="tools/maven-ant-tasks-2.0.10.jar" />
<typedef
resource="org/apache/maven/artifact/ant/antlib.xml"
uri="antlib:org.apache.maven.artifact.ant"
classpathref="maven-ant-tasks.classpath" />
<artifact:remoteRepository
id="scala-tools.repo-snapshots"
url="http://www.scala-tools.org/repo-snapshots/" />
<artifact:remoteRepository
id="scala-tools.repo-releases"
url="http://www.scala-tools.org/repo-releases/" />
<artifact:dependencies pathId="scala.classpath">
<dependency
groupId="org.scala-lang"
artifactId="scala-compiler"
version="2.9.0-1"/>
<dependency
groupId="org.scala-lang"
artifactId="scala-library"
version="2.9.0-1"/>
<remoteRepository refid="scala-tools.repo-releases" />
<remoteRepository refid="scala-tools.repo-snapshots" />
</artifact:dependencies>
<artifact:dependencies pathId="testinterface.classpath">
<dependency
groupId="org.scala-tools.testing"
artifactId="test-interface"
version="0.5"/>
<remoteRepository refid="scala-tools.repo-releases" />
</artifact:dependencies>
<path id="scalacheck.classpath">
<path refid="scala.classpath"/>
<path refid="testinterface.classpath"/>
<pathelement location="target/classes"/>
</path>
<path id="scalacheck.test.classpath">
<path refid="scalacheck.classpath"/>
<pathelement location="target/test-classes"/>
</path>
<taskdef
resource="scala/tools/ant/antlib.xml"
classpathref="scala.classpath"/>
<property name="name" value="${ant.project.name}"/>
<property name="version" value="1.10-SNAPSHOT"/>
<property name="author" value="Rickard Nilsson"/>
<target name="prepare">
<mkdir dir="target/doc/main/api"/>
<mkdir dir="target/classes"/>
<mkdir dir="target/test-classes"/>
<mkdir dir="target/sbaz/lib"/>
<mkdir dir="target/sbaz/doc/scalacheck"/>
</target>
<target name="clean">
<delete dir="target"/>
</target>
<target name="clean-all" depends="clean">
<delete dir="lib_managed"/>
<delete dir="project/build/target"/>
<delete dir="project/boot"/>
</target>
<target name="build" depends="prepare">
<scalac
addParams="-unchecked -deprecation"
srcdir="src/main/scala"
destdir="target/classes"
classpathref="scalacheck.classpath"/>
</target>
<target name="test" depends="build">
<scalac
addParams="-unchecked -deprecation"
srcdir="src/test/scala"
destdir="target/test-classes"
classpathref="scalacheck.classpath"/>
<java
failonerror="true"
classname="org.scalacheck.TestAll"
classpathref="scalacheck.test.classpath"/>
</target>
<target name="doc" depends="prepare">
<copy todir="target/doc/main">
<fileset dir=".">
<include name="LICENSE"/>
<include name="RELEASE"/>
</fileset>
</copy>
<scaladoc
srcdir="src/main/scala"
destdir="target/doc/main/api"
doctitle="${name} ${version}"
classpathref="scalacheck.classpath">
<include name="**/*.scala"/>
</scaladoc>
</target>
<target name="jar" depends="clean,build">
<jar destfile="target/${name}-${version}.jar">
<fileset dir="target/classes">
<include name="org/**"/>
</fileset>
<manifest>
<attribute
name="Built-By"
value="${author}"/>
<attribute
name="Export-Package"
value='org.scalacheck;version="${version}"'/>
<section name="org.scalacheck">
<attribute name="Specification-Title" value="${name}"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="${author}"/>
<attribute name="Implementation-Title" value="scalacheck"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="${author}"/>
</section>
</manifest>
</jar>
</target>
<target name="jar-src" depends="clean,build">
<jar destfile="target/${name}-${version}-src.jar">
<fileset dir="src/main/scala">
<include name="org/**"/>
</fileset>
<manifest>
<attribute name="Built-By" value="${author}"/>
<section name="org.scalacheck">
<attribute name="Specification-Title" value="${name}"/>
<attribute name="Specification-Version" value="${version}"/>
<attribute name="Specification-Vendor" value="${author}"/>
<attribute name="Implementation-Title" value="scalacheck"/>
<attribute name="Implementation-Version" value="${version}"/>
<attribute name="Implementation-Vendor" value="${author}"/>
</section>
</manifest>
</jar>
</target>
<target name="dist" depends="jar,jar-src,doc">
<copy
file="target/${name}-${version}.jar"
tofile="target/sbaz/lib/scalacheck.jar"/>
<copy
file="target/${name}-${version}-src.jar"
tofile="target/sbaz/src/scalacheck-src.jar"/>
<copy todir="target/sbaz/doc/scalacheck">
<fileset dir="target/doc/main"/>
</copy>
<exec executable="sbaz" failonerror="true">
<arg value="pack"/>
<arg value="scalacheck"/>
<arg value="target/sbaz"/>
<arg value="--version"/>
<arg value="${version}"/>
<arg value="--outdir"/>
<arg value="target"/>
<arg value="--linkbase"/>
<arg value="http://scalacheck.googlecode.com/files/"/>
<arg value="--description"/>
<arg value='ScalaCheck is a library for property-based, randomized testing of Scala programs. It is a Scala implementation of the QuickCheck Haskell library'/>
</exec>
<move file="scalacheck-${version}.advert" todir="target"/>
</target>
<target name="install" depends="dist">
<exec executable="sbaz" failonerror="true">
<arg value="install"/>
<arg value="-f"/>
<arg value="target/scalacheck-${version}.sbp"/>
</exec>
</target>
</project>