-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.xml
More file actions
70 lines (63 loc) · 2.67 KB
/
build.xml
File metadata and controls
70 lines (63 loc) · 2.67 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
<project name="linear-data-structures" default="dist" basedir="." xmlns:sonar="antlib:org.sonar.ant">
<description>
Builds a Jar file to pack this artifact
</description>
<property name="src" location="src"/>
<property name="test" location="test"/>
<property name="bin" location="build"/>
<property name="build" location="build"/>
<property name="junit-out" location="junit-out"/>
<property name="dist" location="dist"/>
<property name="version" value="1.0"/>
<property name="sonar.organization" value="linear-data-structures"/>
<property name="sonar.projectKey" value="IsaacSNK_linear-data-structures"/>
<property name="sonar.sources" value="."/>
<property name="sonar.host.url" value="https://sonarcloud.io"/>
<property name="sonar.login" value="3ce86821adf8c96b1b7cbe7d2ca4f62c538a1a49"/>
<target name="init">
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${bin}"/>
</target>
<target name="compile" depends="init" description="compile the source">
<javac srcdir="${src}" destdir="${build}" includeantruntime="no"/>
<javac srcdir="${test}" destdir="${bin}" includeantruntime="no" nowarn="yes" debug="true">
<classpath>
<fileset dir="lib-test">
<include name="**/*.jar"/>
</fileset>
</classpath>
</javac>
</target>
<target name="test" depends="compile" description="run the unit tests">
<junitlauncher>
<classpath>
<pathelement location="bin"/>
<fileset dir="lib-test">
<include name="**/*.jar"/>
</fileset>
</classpath>
<testclasses outputdir="${junit-out}">
<fileset dir="${build}"/>
<listener type="legacy-brief" sendSysOut="true"/>
<listener type="legacy-xml" sendSysErr="true" sendSysOut="true"/>
</testclasses>
</junitlauncher>
</target>
<target name="dist" depends="compile, test" description="generate the distribution">
<buildnumber/>
<mkdir dir="${dist}"/>
<jar destfile="${dist}/linear-data-structures-${version}.${build.number}.jar" basedir="${build}"/>
</target>
<target name="clean" description="clean up">
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${bin}"/>
</target>
<target name="sonar">
<taskdef uri="antlib:org.sonar.ant" resource="org/sonar/ant/antlib.xml">
<classpath path="C:/Users/Isaac/Downloads/sonarqube-ant-task-2.7.0.1612.jar"/>
</taskdef>
<sonar:sonar/>
</target>
</project>