build.xml 3.23 KB
Newer Older
ISWB Prasetya's avatar
ISWB Prasetya committed
1
<project name="T3">
uprime815's avatar
uprime815 committed
2

uprime815's avatar
uprime815 committed
3
	<property name="build" value="../build/t3" />
uprime815's avatar
uprime815 committed
4
5
6
	<property name="tests" value="test" />
	<property name="libs" value="libs" />
	
7
	<property name="RELEASEname" value="T3" />
uprime815's avatar
uprime815 committed
8
	
uprime815's avatar
uprime815 committed
9
	<property name="dist" value="${build}/dist" />
uprime815's avatar
uprime815 committed
10
11

	<target name="init">
uprime815's avatar
uprime815 committed
12
        <mkdir dir="${build}/classes" />
uprime815's avatar
uprime815 committed
13
14
15
16
		<mkdir dir="${build}/docs" />
		<mkdir dir="${build}/docs/javadocs" />
	</target>
    
uprime815's avatar
uprime815 committed
17
	<target name="compile" depends="init" description="Compile the source of T3 tools.">
uprime815's avatar
uprime815 committed
18
		<echo>Compiling T3 tools... </echo>
uprime815's avatar
uprime815 committed
19
		<javac srcdir="./src" 
uprime815's avatar
uprime815 committed
20
21
		    compiler="javac1.8"
			debug="on" 
uprime815's avatar
uprime815 committed
22
			destdir="${build}/classes" 
uprime815's avatar
uprime815 committed
23
24
25
26
			source="1.8" 
			target="1.8">
		  <compilerarg value="-Xlint"/>
          <classpath>
ISWB Prasetya's avatar
ISWB Prasetya committed
27
28
29
              <fileset dir="${libs}">
                <include name="**/*.jar"/>
              </fileset>
uprime815's avatar
uprime815 committed
30
31
32
33
          </classpath>
		</javac>
	</target>
    
uprime815's avatar
uprime815 committed
34
    <target name="jar" depends="compile" description="Jarring all T3 classes.">
uprime815's avatar
uprime815 committed
35
36
37
38
        <echo>Copying licenses... </echo>
		<copy file="license.txt" todir="${build}/T3/classes"/>
		<copy file="gpl_license.txt" todir="${build}/T3/classes"/>
		<echo>Jarring all T3 classes... </echo>
uprime815's avatar
uprime815 committed
39
		<jar basedir="${build}/classes" destfile="${build}/${RELEASEname}.jar" > 
ISWB Prasetya's avatar
ISWB Prasetya committed
40
41
42
43
44
45
		     <zipfileset src="${libs}/cli/commons-cli-1.2.jar"   includes="**/*.class"/>
             <zipfileset src="${libs}/asm/asm-5.0.4.jar"   includes="**/*.class"/>
             <zipfileset src="${libs}/asm/asm-commons-5.0.4.jar"   includes="**/*.class"/>
             <zipfileset src="${libs}/asm/asm-tree-5.0.4.jar"   includes="**/*.class"/>
             <zipfileset src="${libs}/jacoco/org.jacoco.core-0.7.5.201505241946.jar"   includes="**/*.class"/>
             <zipfileset src="${libs}/jacoco/org.jacoco.report-0.7.5.201505241946.jar"   includes="**/*.class"/> 			
uprime815's avatar
uprime815 committed
46
47
48
		</jar>
	</target>

uprime815's avatar
uprime815 committed
49
	<target name="javadocs" depends="compile" description="Generating javadocs.">
uprime815's avatar
uprime815 committed
50
		<echo>Generating javadocs... </echo>
uprime815's avatar
uprime815 committed
51
		<javadoc2 sourcepath="./src" destdir="${build}/docs/javadocs" 
uprime815's avatar
uprime815 committed
52
53
			author="true" 
			version="true" 
uprime815's avatar
uprime815 committed
54
			classpath="${build}/classes"
uprime815's avatar
uprime815 committed
55
56
57
58
59
60
		/>
	</target>
	
	<property name="VERSION" value="${RELEASEname}"/>

	<!-- for packing a distribution zip -->
uprime815's avatar
uprime815 committed
61
	<target name="dist" depends="jar,javadocs">
uprime815's avatar
uprime815 committed
62
		<delete dir="${dist}"/>
uprime815's avatar
uprime815 committed
63
64
65
66
67
68
69
70
		<mkdir dir="${dist}" />
		<copy file="license.txt" todir="${dist}"/>
		<copy file="gpl_license.txt" todir="${dist}"/>
		<copy file="${build}/${RELEASEname}.jar" todir="${dist}"/>
        <mkdir dir="${dist}/docs" />
        <copy todir="${dist}/docs">
		    <fileset dir="${build}/docs"/>
			<fileset dir="./docs"/>
uprime815's avatar
uprime815 committed
71
	    </copy>
uprime815's avatar
uprime815 committed
72
		<zip basedir="${dist}" destfile="${build}/${VERSION}_dist.zip" />
uprime815's avatar
uprime815 committed
73
74
	</target>
			
75
76
77
78
79
80
81
82
83
    <!-- for jarring T3 and support tools for SBST unit testing tool competition -->        
    <target name="jarT3SBST" depends="jar" description="Jarring all T3 classes.">
		<jar destfile="${build}/T3G2_SBST2016.jar" > 
		     <zipfileset src="${build}/${RELEASEname}.jar"   includes="**/*.class"/>
		     <zipfileset src="${build}/../t3static/T3static_v0.jar"   includes="**/*.class"/>
		     <zipfileset src="${build}/../t3tools/CPscanner.jar"   includes="**/*.class"/>
		</jar>
	</target>        
            
uprime815's avatar
uprime815 committed
84
85
86
87
88
89
	<target name="clean" description="Cleaning.">
		<echo>Cleaning... </echo>
		<delete dir="${build}" />
	</target>

</project>