-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
80 lines (74 loc) · 4.5 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="adam_synt" default="jar" xmlns:if="ant:if" xmlns:unless="ant:unless">
<!-- For building the standalone version: the jars in libs.res have to start with ${libfolder}/ and
the classes have to start with ${dependenciesfolder}, or ${frameworkfolder}. -->
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%% PROPERTIES %%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<dirname property="synt.basedir" file="${ant.file.adam_synt}"/>
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%% IMPORTS %%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<property name="subproject.basedir" value="${synt.basedir}"/>
<property file="${subproject.basedir}/build.properties" prefix="adam"/>
<!-- get the correct folder for the dependencies depending on whether we build it as the main project of as a dependency itselve -->
<available file="${adam.dependenciesfolder.asMainProject}/" type="dir" property="isMainProject"/>
<available file="${adam.dependenciesfolder.asDependency}" type="dir" property="isDependency"/>
<property if:set="isMainProject" name="dependenciesfolder" value="${adam.dependenciesfolder.asMainProject}"/>
<property if:set="isDependency" name="dependenciesfolder" value="${adam.dependenciesfolder.asDependency}"/>
<!-- now load the property file again to correctly expand the ${dependencyfolder}. Standard ant doesn't allow overwriting properties,
thus, we loaded it above with a prefix -->
<property file="${subproject.basedir}/build.properties"/>
<import file="${frameworkfolder}/build_macros.xml" optional="false"/>
<include file="${frameworkfolder}/build_targets.xml" as="synt.fu" optional="false"/>
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%% PATHs %%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<union id="synt.jar.res">
<!-- <zipfileset includes="**/*.class" src="${mainfolder}/lib/apt/apt.jar"/>
<zipfileset includes="**/*.stg" src="${mainfolder}/lib/apt/apt.jar"/>
<zipfileset includes="**/*.class" src="${mainfolder}/lib/commons-io-2.4/commons-io-2.4.jar"/>
<zipfileset includes="**/*.class" src="${logics.basedir}/lib/apt/apt-lib.jar"/>
<zipfileset includes="**/*.class" src="${logics.basedir}/lib/apt/apt-io.jar"/>
<zipfileset includes="**/*.stg" src="${logics.basedir}/lib/apt/apt-io.jar"/>-->
</union>
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%% PROPERTIES %%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<target name="loadProperties">
<property file="${subproject.basedir}/build.properties"/>
</target>
<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DELEGATES %%%%%%%%%%%%%%%%%%%%%%%%%%% -->
<target name="test" depends="loadProperties" description="Runs all tests">
<antcall target="synt.fu.test"/>
<!--<ant antfile="${logics.basedir}/build_logics.xml" target="test"></ant> -->
</target>
<target name="test-method" depends="loadProperties" description="Runs the tests of a specific method">
<antcall target="synt.fu.test-method"/>
</target>
<target name="test-class" depends="loadProperties" description="Runs the tests of a specific class">
<antcall target="synt.fu.test-class"/>
</target>
<target name="javac" depends="loadProperties" description="Compiles the module">
<antcall target="synt.fu.javac"/>
</target>
<target name="jar" depends="loadProperties" description="Builds a jar with all its dependencies">
<antcall target="synt.fu.jar"/>
</target>
<target name="jar-standalone" depends="loadProperties" description="Builds a jar with all its dependencies">
<antcall target="synt.fu.jar-standalone"/>
</target>
<target name="deploy" depends="clean-all,jar-standalone" description="Builds a jar with all its dependencies">
<jar destfile="adam_synt.jar">
<zipfileset includes="**/*.class" src="./adam_synt-standalone.jar"/>
<zipfileset includes="**/*.stg" src="./adam_synt-standalone.jar"/>
<!-- <zipfileset dir="${libfolder}" includes="quabs_mac" fullpath="lib/quabs_mac"/>
<zipfileset dir="${libfolder}" includes="quabs_unix" fullpath="lib/quabs_unix"/>-->
<manifest>
<attribute name="Main-Class" value="uniolunisaar.adam.main.ui.cl.AdamSynthesizer"/>
</manifest>
</jar>
</target>
<target name="javadoc" depends="loadProperties" description="Creates the JavaDoc of this package.">
<antcall target="bounded.fu.javadoc"/>
</target>
<target name="clean" depends="loadProperties" description="Cleans all temporary files.">
<antcall target="synt.fu.clean"/>
</target>
<target name="clean-all" depends="loadProperties" description="Cleans all temporary files including the reports">
<antcall target="synt.fu.clean-all"/>
<delete file="adam_protocol.jar" failonerror="false"/>
</target>
</project>