forked from typelevel/scalacheck
/
build.xml
194 lines (173 loc) · 6.06 KB
/
build.xml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<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>