This repository has been archived by the owner on Apr 23, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
103 lines (96 loc) · 3.67 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
<project name="contrats" default="compile" basedir=".">
<description>
The build file for the Tamago example Remocar
</description>
<!-- set global properties for this build -->
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="junit_path" location="lib/junit4.jar" />
<property name="harmcrest_path" location="lib/harmcrest.jar" />
<!-- METTRE ICI LE NOM DU BINOME -->
<property name="nom1" value="CHAMOREAU_Pauline"/>
<property name="nom2" value="RIGNAULT_Nicolas"/>
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="compile" depends="init"
description="compile the source " >
<!-- Compile the java code from ${src} into ${build} -->
<javac debug="true" srcdir="${src}" excludes="" destdir="${build}">
<classpath>
<pathelement location="${junit_path}"/>
<pathelement location="${harmcrest_path}"/>
</classpath>
</javac>
</target>
<target name="run1" depends="compile"
description="run Tetris with Contracts">
<echo>================ Run Tetris with Contracts ================</echo>
<java classname="programme.Launch" classpath="${build}" fork="true">
<arg value="true"/>
</java>
</target>
<target name="run2" depends="compile"
description="run Tetris without Contracts">
<echo>================ Run Tetris without Contracts ================</echo>
<java classname="programme.Launch"
classpath="${build}" fork="true">
<arg value="false"/>
</java>
</target>
<target name="tests" depends="init,compile" description="Lancer les tests JUNIT">
<echo>================ Running JUNIT Tests... ================</echo>
<junit printsummary="yes">
<classpath>
<pathelement location="${junit_path}"/>
<pathelement location="${harmcrest_path}"/>
<pathelement location="${build}" />
</classpath>
<batchtest fork="yes">
<fileset dir="${src}" includes="block/*Test.java"/>
<fileset dir="${src}" includes="board/*Test.java"/>
<fileset dir="${src}" includes="grid/*Test.java"/>
<fileset dir="${src}" includes="joueur/*Test.java"/>
<fileset dir="${src}" includes="tetris/*Test.java"/>
</batchtest>
</junit>
</target>
<target name="dist" depends="init,clean"
description="Generer la distribution" >
<!-- tout mettre dans l'archive -->
<jar basedir=".." jarfile="../CPS-Projet-Tetris-${nom1}-${nom2}.jar"
includes="Tetris/**/*" excludes="**/.svn">
<exclude name="Tetris/.git/**"/>
<exclude name="Tetris/bin/**"/>
<exclude name="Tetris/spec/*.aux"/>
<exclude name="Tetris/spec/*.tex"/>
<exclude name="Tetris/spec/*.loc"/>
<exclude name="Tetris/spec/*.toc"/>
<exclude name="Tetris/spec/*.log"/>
<exclude name="Tetris/spec/*.backup"/>
<exclude name="Tetris/spec/*~"/>
<exclude name="Tetris/*.aux"/>
<exclude name="Tetris/*.tex"/>
<exclude name="Tetris/*.loc"/>
<exclude name="Tetris/*.toc"/>
<exclude name="Tetris/*.log"/>
<exclude name="Tetris/*.backup"/>
<exclude name="Tetris/*~"/>
</jar>
</target>
<target name="clean"
description="clean up" >
<echo>================ Removing temporary files... ================</echo>
<delete verbose="true"> <!-- Remove all *~ files -->
<fileset dir="${basedir}" defaultexcludes="no">
<include name="**/*~"/>
</fileset>
</delete>
<echo>================ Removing build directory ================</echo>
<delete dir="${build}"/>
<delete dir="${build}"/>
</target>
</project>