-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.xml
117 lines (102 loc) · 3.85 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<project name="project-oriented-ide" default="dist" basedir=".">
<description>Unitex/GramLab Project-oriented IDE build file</description>
<!-- set global properties for this build -->
<property name="src" location="src" />
<property name="build" location="build" />
<property name="classes" location="classes" />
<property name="dist" location="dist" />
<property name="lib" location="lib" />
<property name="licenses" location="licenses" />
<property name="resources" location="resources" />
<property environment="env" />
<!-- targets -->
<target name="init">
<!-- Classic IDE init-->
<subant target="init">
<property name="basedir" value="unitex"/>
<property name="dist-dir" value="${dist}"/>
<fileset dir="unitex" includes="build.xml"/>
</subant>
<!-- Create the time stamp -->
<tstamp />
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}" />
</target>
<target name="clean" description="clean up">
<!-- Classic IDE clean-->
<subant target="clean">
<property name="basedir" value="unitex"/>
<fileset dir="unitex" includes="build.xml"/>
</subant>
<echo message="Deleting files in ${build}" level="info" />
<delete includeemptydirs="true" quiet="true">
<fileset dir="${build}" includes="**/*" />
</delete>
<delete dir="${build}" />
<echo message="Deleting files in ${classes}" level="info" />
<delete includeemptydirs="true" quiet="true">
<fileset dir="${classes}" includes="**/*" />
</delete>
<delete dir="${classes}" />
<echo message="Deleting files in ${dist}" level="info" />
<delete includeemptydirs="true" quiet="true">
<fileset dir="${dist}" includes="**/*" />
</delete>
<delete dir="${dist}" />
</target>
<target name="compile" depends="init" description="compile the source">
<!-- Classic IDE dist-->
<subant target="dist">
<property name="basedir" value="unitex"/>
<property name="dist-dir" value="${dist}"/>
<fileset dir="unitex" includes="build.xml"/>
</subant>
<!-- Compile the java code from ${src} into ${build} -->
<echo message="classpath=${dist}/Unitex.jar"/>
<javac release="8" encoding="UTF-8" srcdir="${src}" destdir="${build}" classpath="${dist}/Unitex.jar" includeAntRuntime="false"/>
</target>
<target name="dist" depends="compile" description="generate the distribution">
<!-- Classic IDE dist-->
<subant target="dist">
<property name="basedir" value="unitex"/>
<property name="dist-dir" value="${dist}"/>
<fileset dir="unitex" includes="build.xml"/>
</subant>
<mkdir dir="${classes}" />
<copy todir="${classes}">
<fileset dir="src/main/resources" />
</copy>
<copy todir="${classes}">
<fileset dir="${build}" />
</copy>
<!-- Create the distribution directory -->
<mkdir dir="${dist}" />
<!-- create Gramlab.jar -->
<jar jarfile="${dist}/Gramlab.jar" manifest="${classes}/fr/gramlab/Manifest.mf" basedir="${classes}" />
</target>
<target name="install-init">
<fail unless="env.UNITEX_BUILD_RELEASE_DIR" message="UNITEX_BUILD_RELEASE_DIR is not set. try `export UNITEX_BUILD_RELEASE_DIR=.`"/>
<property name="unitexHome" value="${env.UNITEX_BUILD_RELEASE_DIR}"/>
<property name="app" location="${unitexHome}/App" />
<property name="app-lib" location="${unitexHome}/App/lib" />
<property name="app-licenses" location="${unitexHome}/App/licenses" />
</target>
<target name="install" depends="install-init,dist">
<copy todir="${app}">
<fileset dir="${dist}" />
<fileset dir="${resources}">
<include name="*.ico" />
</fileset>
</copy>
<copy todir="${app-lib}">
<fileset dir="${lib}">
<include name="*.jar" />
</fileset>
</copy>
<copy todir="${app-licenses}">
<fileset dir="${licenses}">
<include name="*.txt" />
</fileset>
</copy>
</target>
</project>