-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
186 lines (151 loc) · 6.28 KB
/
build.xml
File metadata and controls
186 lines (151 loc) · 6.28 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
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
<project name="qbf4j" default="test" basedir=".">
<property name="version" value="0.1-alpha"/>
<property name="src" location="src"/>
<property name="src.main.java" location="${src}/main/java"/>
<property name="src.test.java" location="${src}/test/java"/>
<property name="src.benchmark.java" location="${src}/benchmark/java"/>
<property name="src.benchmark.resources" location="${src}/benchmark/resources"/>
<property name="bin" location="bin"/>
<property name="bin.main" location="${bin}/main"/>
<property name="bin.test" location="${bin}/test"/>
<property name="bin.benchmark" location="${bin}/benchmark"/>
<property name="dist" location="dist"/>
<property name="dist.name" value="${ant.project.name}-${version}"/>
<property name="doc" location="doc"/>
<property name="lib" location="lib"/>
<target name="init">
<tstamp/>
<mkdir dir="${bin.main}"/>
<mkdir dir="${bin.test}"/>
<mkdir dir="${bin.benchmark}"/>
</target>
<!-- compilation -->
<target name="compile" depends="init">
<javac srcdir="${src.main.java}"
destdir="${bin.main}"
includeantruntime="false"/>
</target>
<target name="compile-test" depends="compile">
<javac srcdir="${src.test.java}"
destdir="${bin.test}"
includeantruntime="false">
<classpath location="${bin.main}"/>
<classpath location="${junit.jar}"/>
</javac>
</target>
<target name="compile-benchmark" depends="compile">
<javac srcdir="${src.benchmark.java}"
destdir="${bin.benchmark}"
includeantruntime="false">
<classpath location="${bin.main}"/>
<classpath refid="jmh.build.path"/>
</javac>
<copy todir="${bin.benchmark}">
<fileset dir="${src.benchmark.resources}"/>
</copy>
</target>
<!-- distribution -->
<target name="dist" depends="compile,doc">
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/qcir2pnf-${version}.jar"
basedir="${bin.main}">
<manifest>
<attribute name="Main-Class" value="main.qcir2pnf"/>
</manifest>
</jar>
<jar jarfile="${dist}/${dist.name}.jar"
basedir="${bin.main}"
excludes="main/*"/>
<jar jarfile="${dist}/${dist.name}-sources.jar"
basedir="${src.main.java}"/>
<jar jarfile="${dist}/${dist.name}-javadoc.jar"
basedir="${doc}"/>
</target>
<!-- javadoc -->
<target name="doc">
<mkdir dir="${doc}"/>
<javadoc sourcepath="${src.main.java}"
destdir="${doc}"
encoding="utf8" docencoding="utf8" charset="utf8"
link="https://docs.oracle.com/javase/8/docs/api/"/>
</target>
<!-- unit tests -->
<property name="junit.ver" value="1.2.0"/>
<property name="junit.jar" location="${lib}/junit-platform-console-standalone-${junit.ver}.jar"/>
<target name="download-junit">
<mkdir dir="${lib}"/>
<get src="https://repo1.maven.org/maven2/org/junit/platform/junit-platform-console-standalone/${junit.ver}/junit-platform-console-standalone-${junit.ver}.jar"
dest="${junit.jar}"
verbose="true" usetimestamp="true" skipexisting="true"/>
</target>
<target name="test" depends="download-junit,compile,compile-test">
<java jar="${junit.jar}" fork="true">
<arg line="-cp"/>
<arg path="${bin.main}:${bin.test}"/>
<arg line="--scan-classpath"/>
</java>
</target>
<!-- benchmarks (JMH) -->
<property name="jmh.ver" value="1.19"/>
<property name="jmh-core.jar" location="${lib}/jmh-core.jar"/>
<property name="jmh-core-benchmarks.jar" location="${lib}/jmh-core-benchmarks.jar"/>
<property name="jmh-generator-annprocess.jar" location="${lib}/jmh-generator-annprocess.jar"/>
<property name="joptsimple.jar" location="${lib}/joptsimple.jar"/>
<property name="commonsmath.jar" location="${lib}/commonsmath.jar"/>
<path id="jmh.build.path">
<pathelement location="${jmh-core.jar}"/>
<pathelement location="${jmh-generator-annprocess.jar}"/>
</path>
<path id="jmh.runtime.path">
<pathelement location="${jmh-core.jar}"/>
<pathelement location="${joptsimple.jar}"/>
<pathelement location="${commonsmath.jar}"/>
</path>
<target name="download-jmh">
<mkdir dir="${lib}"/>
<get src="http://central.maven.org/maven2/org/openjdk/jmh/jmh-core/${jmh.ver}/jmh-core-${jmh.ver}.jar"
dest="${jmh-core.jar}"
verbose="true" usetimestamp="true" skipexisting="true"/>
<get src="http://central.maven.org/maven2/org/openjdk/jmh/jmh-core-benchmarks/${jmh.ver}/jmh-core-benchmarks-${jmh.ver}.jar"
dest="${jmh-core-benchmarks.jar}"
verbose="true" usetimestamp="true" skipexisting="true"/>
<get src="http://central.maven.org/maven2/org/openjdk/jmh/jmh-generator-annprocess/${jmh.ver}/jmh-generator-annprocess-${jmh.ver}.jar"
dest="${jmh-generator-annprocess.jar}"
verbose="true" usetimestamp="true" skipexisting="true"/>
<get src="http://central.maven.org/maven2/net/sf/jopt-simple/jopt-simple/4.6/jopt-simple-4.6.jar"
dest="${joptsimple.jar}"
verbose="true" usetimestamp="true" skipexisting="true"/>
<get src="http://central.maven.org/maven2/org/apache/commons/commons-math3/3.2/commons-math3-3.2.jar"
dest="${commonsmath.jar}"
verbose="true" usetimestamp="true" skipexisting="true"/>
</target>
<target name="benchmark" depends="download-jmh,compile-benchmark,instrumentation">
<mkdir dir="${dist}"/>
<jar jarfile="${dist}/${dist.name}-benchmark.jar"
basedir="${bin.benchmark}">
<manifest>
<attribute name="Main-Class" value="org.openjdk.jmh.Main"/>
</manifest>
<fileset dir="${bin.main}"/>
<zipfileset src="${jmh-core.jar}" excludes="**/META-INF/services/**"/>
<zipfileset src="${joptsimple.jar}"/>
<zipfileset src="${commonsmath.jar}"/>
</jar>
</target>
<!-- benchmarks (tree size) -->
<target name="instrumentation" depends="init,compile-benchmark">
<jar destfile="${dist}/${dist.name}-QBFSizeAgent.jar">
<fileset dir="${bin.benchmark}" includes="**/QBFSizeAgent.class"/>
<manifest>
<attribute name="Premain-Class" value="at.jku.fmv.qbf.benchmark.util.QBFSizeAgent"/>
<attribute name="Agent-Class" value="at.jku.fmv.qbf.benchmark.util.QBFSizeAgent"/>
</manifest>
</jar>
</target>
<!-- cleanup -->
<target name="clean">
<delete dir="${bin}"/>
<delete dir="${dist}"/>
<delete dir="${doc}"/>
</target>
</project>